diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-08-03 19:49:15 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-08-03 19:49:15 +0200 |
| commit | e6030fa04a8de3fdae1dc19d081bf5feb3d3d73c (patch) | |
| tree | 89f392cd974d1109a203ade305da467bd378ee48 /Samples/ShowCase/ui/Interfaces/TemplatedControl | |
| parent | cad504c62d45952b4651603579f34df0d230841e (diff) | |
sample directory
Diffstat (limited to 'Samples/ShowCase/ui/Interfaces/TemplatedControl')
7 files changed, 83 insertions, 0 deletions
diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testButton.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testButton.crow new file mode 100755 index 00000000..8911619d --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testButton.crow @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<VerticalStack Fit="true" Background="vgradient|0:DimGrey|1:Black"> + <HorizontalStack Fit="True"> + <Button Caption="but" MouseClick="onButClick"/> + <Button Caption="but" MouseClick="onButClick" Fit="true"/> + <Button Width="60" Height="40" MouseClick="onButClick"/> + <Button Caption="Long text button" MouseClick="onButClick"/> + <Button Font="droid, 20" Caption="Button"/> + </HorizontalStack> +</VerticalStack>
\ No newline at end of file diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCheckbox.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCheckbox.crow new file mode 100755 index 00000000..7c8438c0 --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCheckbox.crow @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<VerticalStack Fit="true" Margin="100" Background="DimGrey" > + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> +</VerticalStack> diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCombobox.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCombobox.crow new file mode 100755 index 00000000..4363986e --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testCombobox.crow @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<Container Background="DimGrey" Width="300"> + <ComboBox Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/> +</Container>
\ No newline at end of file diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow new file mode 100755 index 00000000..b29be381 --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<Border BorderWidth="2" Fit="true"> + <VerticalStack Fit="true" Margin="5"> + <ListBox Data="{TestList}" Background="0.5,0.5,0.5,0.7" + HorizontalAlignment="Center" Width="200" Height="200" Margin="5"> + <Template> + <Border BorderWidth="1"> + <HorizontalStack Margin="1"> + <Scroller Name="scroller1" Margin="2"> + <VerticalStack Height="Fit" MinimumSize="10,10" + Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/> + </Scroller> + <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}" + LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" CursorSize="{../scroller1.ChildHeightRatio}" + Maximum="{../scroller1.MaxScrollY}" Orientation="Vertical" + Width="14" /> + </HorizontalStack> + </Border> + </Template> + <ItemTemplate DataType="Crow.Color"> + <HorizontalStack + HorizontalAlignment="Left" + Height="Fit" Width="200" Margin="1" Focusable="true" + MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}" + MouseLeave="{Background=Transparent}"> + <Widget Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/> + <Label Text="{}" Margin="0" Width="Stretched"/> + </HorizontalStack> + </ItemTemplate> + </ListBox> + <HorizontalStack Fit="true" HorizontalAlignment="Right"> + <Button Caption="Load list" MouseDown="OnLoadList"/> + <Button Caption="Clear" MouseDown="OnClear"/> + </HorizontalStack> + </VerticalStack> +</Border> diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testRadioButton.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testRadioButton.crow new file mode 100755 index 00000000..a01d9041 --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testRadioButton.crow @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGrey"> + <RadioButton Caption="Radio1"/> + <RadioButton Caption="Radio2" IsChecked="true"/> + <RadioButton Caption="Radio3"/> + <RadioButton Caption="Radio4"/> +</VerticalStack> diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testScrollbar.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testScrollbar.crow new file mode 100755 index 00000000..f8c4a9ae --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testScrollbar.crow @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<Group Name="TopContainer" Width="400" Height="400" + Focusable="True" Background="Grey"> + <ScrollBar Height="16" Orientation="Horizontal" Width="Stretched" Maximum="100"/> +</Group>
\ No newline at end of file diff --git a/Samples/ShowCase/ui/Interfaces/TemplatedControl/testSpinner.crow b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testSpinner.crow new file mode 100755 index 00000000..01d53016 --- /dev/null +++ b/Samples/ShowCase/ui/Interfaces/TemplatedControl/testSpinner.crow @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<VerticalStack Name="TopContainer" Width="400" Height="Fit" + Margin="20" Background="DarkGrey"> + + <HorizontalStack Fit="true" Margin="5" Background="SkyBlue"> + <Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/> + <Spinner Value="5"/> + <Spinner Value="5"/> + </HorizontalStack> +</VerticalStack>
\ No newline at end of file |