aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Experimental
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-13 05:27:50 +0000
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-13 05:27:50 +0000
commitf85e1c85eac4ea3271e53b6fea6c5bda94e6a8d6 (patch)
tree814a75a0891199ff5612ae13092e75b61c76548c /Samples/common/ui/Interfaces/Experimental
parent08ed2eac3ae1bccc5d1fbdeb3b596cf122a24e2f (diff)
wip, save commit before trying to allow 'ItemTemplate' in style
Diffstat (limited to 'Samples/common/ui/Interfaces/Experimental')
-rw-r--r--Samples/common/ui/Interfaces/Experimental/icobut.crow31
-rw-r--r--Samples/common/ui/Interfaces/Experimental/templatedControlMargin.crow11
2 files changed, 42 insertions, 0 deletions
diff --git a/Samples/common/ui/Interfaces/Experimental/icobut.crow b/Samples/common/ui/Interfaces/Experimental/icobut.crow
new file mode 100644
index 00000000..68730dcf
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/icobut.crow
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<HorizontalStack Height="Fit">
+ <Button Command="{SingleCommand}" Background="DimGrey" CornerRadius="15">
+ <Template>
+ <Border Background="{./Background}" Name="Content" Margin="8" Tooltip="{./Caption}"
+ Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
+ MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
+ MouseLeave="{Foreground=Transparent}"
+ MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White};{Background=${ControlHighlight}}"
+ MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black};{Background=DimGrey}">
+ <Image Name="caption" Width="32" Height="32" Path="{./Icon}" />
+ </Border>
+ </Template>
+ </Button>
+
+ <Button Command="{SingleCommand}">
+ <Template>
+ <Border Background="{./Background}" MinimumSize="50,20" Name="Content"
+ Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
+ MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black};{caption.Foreground=White}"
+ MouseLeave="{Foreground=Transparent};{caption.Foreground=LightGrey}"
+ MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+ MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}">
+ <HorizontalStack Margin="2">
+ <Image Style="Icon" Path="{./Icon}"/>
+ <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGrey" Text="{./Caption}"/>
+ </HorizontalStack>
+ </Border>
+ </Template>
+ </Button>
+</HorizontalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Experimental/templatedControlMargin.crow b/Samples/common/ui/Interfaces/Experimental/templatedControlMargin.crow
new file mode 100644
index 00000000..fcd4d29e
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/templatedControlMargin.crow
@@ -0,0 +1,11 @@
+<HorizontalStack Margin="10" Height="Stretched" Visible="{ProgressVisible}" Background="SaddleBrown">
+ <ProgressBar Value="50" Maximum="100" Caption="Progress caption" Width="Stretched" Height="Stretched" Margin="0">
+ <Template>
+ <Group Background="Red" Margin="1" Height="Stretched" Width="Stretched">
+ <Gauge Background="DarkGrey" Foreground="RoyalBlue" Height="Stretched"
+ Orientation="{./Orientation}" Minimum="{./Minimum}" Maximum="{./Maximum}" Value="{./Value}"/>
+ <Label Foreground="White" Text="{./Caption}" Width="Stretched" Margin="3" Background="Transparent" Height="Fit"/>
+ </Group>
+ </Template>
+ </ProgressBar>
+</HorizontalStack> \ No newline at end of file