aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/TemplatedControl/testCheckbox.crow
blob: 9582994ff0f57f6c9dad1990cb767fb61c996059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0"?>
<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" IsChecked="{²BoolVal}"
						Checked="{sh.HorizontalAlignment=Right};{Background=SeaGreen}"
						Unchecked="{sh.HorizontalAlignment=Left};{Background=Jet}">
		<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 "/>
			</Group>
		</Template>
	</CheckBox>
	<CheckBox Caption="Ok" Background="Transparent" Height="30" Width="30" IsChecked="{²BoolVal}" CornerRadius="10"
						Checked="{Background=SeaGreen}"
						Unchecked="{Background=Red}">
		<Template>
			<Label2 Background="{./Background}" Text="{./Caption}" Margin="5" CornerRadius="{./CornerRadius}"/>
		</Template>
	</CheckBox>	
</VerticalStack>