aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/menutest2.crow
blob: 32e841ea35373b9f76204a955709ba5d91b04ffc (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
59
<?xml version="1.0"?>
<Menu Data="{AllCommands}">
	<ItemTemplate DataType="CommandGroup" >
			<MenuItem Data="{Commands}" Width="Fit" IsEnabled="{CanExecute}">
				<Template>
					<Popper PopDirection="Bottom" Caption="{Caption}"
									PopWidth="{./PopWidth}" PopHeight="{./PopHeight}"
									MouseEnter="{Background=${ControlHighlight}}"
									MouseLeave="{Background=Transparent}">
						<Template>
							<Label Text="{./Caption}" Width="Stretched" Height="Stretched" Margin="3"
								Background="{./Background}"/>
						</Template>
						<VerticalStack Name="ItemsContainer" Fit="true" Background="DarkGrey"/>
					</Popper>
				</Template>
				<ItemTemplate DataType="Command" >
					<Button Command="{}" Width="Stretched">
						<Template>
							<HorizontalStack  Margin="3" HorizontalAlignment="Left"
													MouseEnter="{Background=${ControlHighlight}}"
													MouseLeave="{Background=Transparent}">
								<Image Width="10" Height="10" Margin="1" Path="{./Icon}" />
								<Label Text="{./Caption}" />	
							</HorizontalStack>
						</Template>
					</Button>
				</ItemTemplate>					
				<ItemTemplate DataType="CommandGroup" >
					<MenuItem Data="{Commands}" Width="Stretched" IsEnabled="{CanExecute}">
						<Template>
							<Popper PopDirection="Right" Caption="{Caption}"
									PopWidth="{./PopWidth}" PopHeight="{./PopHeight}"
									MouseEnter="{Background=${ControlHighlight}}"
									MouseLeave="{Background=Transparent}">
								<Template>
									<Label Text="{./Caption}" Width="Stretched" Height="Stretched" Margin="3"
										Background="{./Background}"/>
								</Template>		
								<VerticalStack Name="ItemsContainer" Fit="true" Background="DarkGrey"/>
							</Popper>
						</Template>
						<ItemTemplate DataType="Command">
							<Button Command="{}" Width="Stretched">
								<Template>
									<HorizontalStack  Margin="3" HorizontalAlignment="Left"
															MouseEnter="{Background=${ControlHighlight}}"
															MouseLeave="{Background=Transparent}">
										<Image Width="10" Height="10" Margin="1" Path="{./Icon}" />
										<Label Text="{./Caption}" />	
									</HorizontalStack>
								</Template>
							</Button>
						</ItemTemplate>
					</MenuItem>
				</ItemTemplate>
			</MenuItem>
		</ItemTemplate>	
</Menu>