aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Experimental/toggleCmd.crow
blob: 40a39abb4e6c11fe91ac38df13f5ee00784f6b2d (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<VerticalStack Fit="true">
	<HorizontalStack Fit="true">
		<Button Command="{CMDToggleBoolVal}"/>
		<CheckBox Caption="direct bound to bool value" IsChecked="{²BoolVal}" Background="Jet"/>
		<Button Command="{CMDToggleBoolVal}">
			<Template>
				<Container DataSource="{./Command}">
					<CheckBox Caption="{./Caption}" Style="CheckBox2" IsChecked="{²IsToggled}"/>
				</Container>
			</Template>
		</Button>
		<Button Command="{CMDToggleBoolVal}">
			<Template>
				<Border DataSource="{./Command}" Name="Content" Margin="2"
							Background="DarkGrey" 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=Yellow}"
							MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black};{Background=DarkGrey}">
					<CheckBox Focusable="False" Width="Stretched" Height="Stretched" IsChecked="{²IsToggled}"
							Checked="{Background=${ControlHighlight}}"
							Unchecked="{Background=Jet}">
						<Template>
							<Image Style="icon" Name="caption" Path="{Icon}" Background="{./Background}" Margin="10"/>
						</Template>
					</CheckBox>					
				</Border>
			</Template>
		</Button>
		<Button Command="{CMDToggleBoolVal}">
			<Template>
				<Container DataSource="{./Command}">
<!--					<CheckBox Caption="{./Caption}" Style="CheckBox2" IsChecked="{²IsToggled}"/>-->
					<CheckBox Width="Stretched" Height="Stretched" IsChecked="{²IsToggled}"
							Checked="{Background=${ControlHighlight}}"
							Unchecked="{Background=Jet}">
						<Template>
							<Image Style="icon" Name="caption" Path="{Icon}" Background="{./Background}" Margin="10"/>
						</Template>
					</CheckBox>
				</Container>
			</Template>
		</Button>
	</HorizontalStack>
	<HorizontalStack Fit="true">
		<Button Command="{CMDToggleBoolValField}">
			<Template>
				<Container DataSource="{./Command}">
					<CheckBox Caption="{./Caption}" Style="CheckBox2" IsChecked="{²IsToggled}"/>
				</Container>
			</Template>
		</Button>
	</HorizontalStack>
</VerticalStack>