aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/menutest.crow
blob: eca923e5db5e4fff439bd7b082d2f99d851fc5c2 (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
56
57
58
<?xml version="1.0"?>
<Menu Data="{AllCommands}">
	<ItemTemplate DataType="Crow.Command">
		<Button Command="{}">
			<Template>
				<Label Text="{./Caption}" Width="Stretched" Height="Stretched" Margin="3"
								MouseEnter="{Background=${ControlHighlight}}"
								MouseLeave="{Background=Transparent}"/>
			</Template>
		</Button>
	</ItemTemplate>
	<ItemTemplate DataType="Crow.CommandGroup" >
		<MenuItem Data="{Commands}" Width="Fit" IsEnabled="{CanExecute}">
			<Template>
				<Popper PopDirection="Bottom" Caption="{Caption}"
								MouseEnter="{Background=${ControlHighlight}}"
								MouseLeave="{Background=Transparent}">
					<Template>
						<Label Text="{./Caption}" Width="Stretched" Height="Fit" Margin="3"
							Background="{./Background}"/>
					</Template>
					<VerticalStack Name="ItemsContainer" Fit="true" Background="Jet"/>
				</Popper>
			</Template>
			<ItemTemplate DataType="Crow.Command">
				<Label Text="{Caption}" HorizontalAlignment="Left" Width="Stretched" Height="Fit" Margin="0" 
								MouseEnter="{Background=${ControlHighlight}}"
								MouseLeave="{Background=Transparent}"/>
			</ItemTemplate>					
			<ItemTemplate DataType="Crow.CommandGroup" >
				<MenuItem Data="{Commands}" Width="Stretched"  IsEnabled="{CanExecute}">
					<Template>
						<Popper PopDirection="Right" Caption="{Caption}"
								MouseEnter="{Background=${ControlHighlight}}"
								MouseLeave="{Background=Transparent}">
							<Template>
								<Label Text="{./Caption}" Width="Stretched" Height="Stretched" Margin="3"
									Background="{./Background}"/>
							</Template>		
							<Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="DarkGrey">
								<VerticalStack Name="ItemsContainer"/>
							</Border>
						</Popper>
					</Template>
					<ItemTemplate DataType="Crow.Command">
						<Button Command="{}" Width="Stretched">
							<Template>
								<Label Text="{./Caption}" Width="Stretched" Height="Stretched"  Margin="3"
												MouseEnter="{Background=${ControlHighlight}}"
												MouseLeave="{Background=Transparent}"/>
							</Template>
						</Button>
					</ItemTemplate>
				</MenuItem>
			</ItemTemplate>
		</MenuItem>
	</ItemTemplate>
</Menu>