aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/TemplatedControl
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-06 13:40:54 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-06 13:40:54 +0200
commitc928fc85cd1faed7273722f99b2a1edd9de14299 (patch)
treef9344290fb876906205f9d8ab4b401ec3d040250 /Samples/common/ui/Interfaces/TemplatedControl
parentd88c47659d248dbf5b4ec2b071906fafe013011e (diff)
slider as base for scrollbar, gauge widget
Diffstat (limited to 'Samples/common/ui/Interfaces/TemplatedControl')
-rw-r--r--Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow37
-rw-r--r--Samples/common/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow19
-rw-r--r--Samples/common/ui/Interfaces/TemplatedControl/testScrollbar.crow2
3 files changed, 38 insertions, 20 deletions
diff --git a/Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow b/Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow
index 7c8438c0..b5eb0fc7 100644
--- a/Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow
+++ b/Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow
@@ -1,11 +1,30 @@
<?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 Margin="50" Background="DarkGrey" Spacing="10" >
+ <CheckBox />
+ <CheckBox Background="Jet">
+ <Template>
+ <HorizontalStack Spacing="5" Background="{./Background}" Margin="5">
+ <Label Text="{./Caption}"/>
+ <Label Text="{./IsChecked}"/>
+ </HorizontalStack>
+ </Template>
+ </CheckBox>
+ <CheckBox Background="Onyx" Width="Stretched">
+ <Template>
+ <HorizontalStack Spacing="4" Background="{./Background}" Margin="4">
+ <Border BorderWidth="0" Width="16" Height="16" Background="Black" Margin="1">
+ <Widget Background="SeaGreen" Visible="{./IsChecked}"/>
+ </Border>
+ <Label Text="{./Caption}"/>
+ </HorizontalStack>
+ </Template>
+ </CheckBox>
+ <CheckBox Background="Jet" Height="30" Width="60" Checked="{Background=SeaGreen}" >
+ <Template>
+ <Group Background="{./Background}" Margin="0" CornerRadius="100">
+ <Shape Name="sh" HorizontalAlignment="Left" Width="{./Height}" Foreground="Grey" Size="16,16" Path="A 8,8,7.5,0,6.3 f O 1,1,1,1 G "/>
+ <Shape Visible="{./IsChecked}" HorizontalAlignment="Right" Width="{./Height}" Foreground="Grey" Size="16,16" Path="A 8,8,7.5,0,6.3 f O 1,1,1,1 G "/>
+ </Group>
+ </Template>
+ </CheckBox>
</VerticalStack>
diff --git a/Samples/common/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Samples/common/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow
index b29be381..fd873489 100644
--- a/Samples/common/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow
+++ b/Samples/common/ui/Interfaces/TemplatedControl/testItemTemplateTag.crow
@@ -1,29 +1,28 @@
<?xml version="1.0"?>
-<Border BorderWidth="2" Fit="true">
+<Border BorderWidth="2" Fit="true" Background="DarkGrey">
<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">
+ <ListBox Data="{TestList}" Background="Jet" HorizontalAlignment="Center" Width="200" Height="200" Margin="5">
<Template>
- <Border BorderWidth="1">
+ <Border BorderWidth="1" Background="{./Background}">
<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" />
+ LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="10" CursorSize="{../scroller1.ChildHeightRatio}"
+ Maximum="{../scroller1.MaxScrollY}" />
</HorizontalStack>
</Border>
</Template>
- <ItemTemplate DataType="Crow.Color">
+ <ItemTemplate DataType="Crow.Colors">
<HorizontalStack
HorizontalAlignment="Left"
Height="Fit" Width="200" Margin="1" Focusable="true"
- MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
+ MouseEnter="{Background=RoyalBlue}"
MouseLeave="{Background=Transparent}">
- <Widget Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
+
+ <Border Foreground="Black" Height="16" Width="30" Background="{}" Margin="0" CornerRadius="4"/>
<Label Text="{}" Margin="0" Width="Stretched"/>
</HorizontalStack>
</ItemTemplate>
diff --git a/Samples/common/ui/Interfaces/TemplatedControl/testScrollbar.crow b/Samples/common/ui/Interfaces/TemplatedControl/testScrollbar.crow
index 0b1a775e..1eac5fe3 100644
--- a/Samples/common/ui/Interfaces/TemplatedControl/testScrollbar.crow
+++ b/Samples/common/ui/Interfaces/TemplatedControl/testScrollbar.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<Group Name="TopContainer" Focusable="True" Background="DarkGrey" Margin="50">
- <ScrollBar Maximum="100" Height="90%"/>
+ <ScrollBar Width="10" CornerRadius="5" Maximum="100" Height="90%"/>
<ScrollBar Style="HScrollBar" Maximum="100" VerticalAlignment="Bottom"/>
</Group> \ No newline at end of file