aboutsummaryrefslogtreecommitdiffstatsci
path: root/CrowIDE/ui/ContextMenu.template
blob: bd38532df38da26e2d136ac2de0deff5d1052a22 (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
<?xml version="1.0" encoding="UTF-8" ?>
<MenuItem MinimumSize="20,20" Height="Fit" Width="160" Caption="Context Menu" Data="{ContextCommands}" Orientation="Vertical"
	IsOpened ="true" Visible="{/IsOpened}" SelectionBackground="Transparent">
	<Template>		
		<Border Background="DimGray" Foreground="Black" CornerRadius="2">
			<GenericStack Orientation="{./Orientation}" Name="ItemsContainer" Margin="2"/>
		</Border>		
	</Template>
	<ItemTemplate>
		<MenuItem Command="{}" Width="150" PopWidth="120" SelectionBackground="Transparent" IsEnabled="{CanExecute}">
			<Template>
				<Popper Font="{./Font}" Caption="{./Caption}"  Background="{./Background}" PopDirection="{./PopDirection}"
					Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseDown="./onMI_Click"
					IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
					<Template>
						<Border Name="border1"
								CornerRadius="0"
								MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
								MouseLeave="{Foreground=Transparent}"
								MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
								MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
								MinimumSize = "60,0"
								Foreground="Transparent"
								Background="{./Background}">
								<HorizontalStack Spacing="5">
									<Image Height="14" Width="14" Picture="{Icon}" />
									<Label Text="{./Caption}"
										Foreground="{./Foreground}"
										Margin="1" HorizontalAlignment="Left"
										Font="{./Font}"	/>
								</HorizontalStack>
						</Border>
					</Template>
					<Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGray">
						<VerticalStack Name="ItemsContainer"/>
					</Border>
				</Popper>
			</Template>
		</MenuItem>
	</ItemTemplate>
</MenuItem>