blob: 45244442849cb6760df18cdc7cd33b33511f5e3c (
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
|
<?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"
Background="Red">
<Template>
<HorizontalStack>
<Border Background="DimGray" Foreground="Jet" CornerRadius="5">
<GenericStack Orientation="{./Orientation}" Name="ItemsContainer"
Margin="2"/>
</Border>
</HorizontalStack>
</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="2"
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}">
<Label Text="{./Caption}"
Foreground="{./Foreground}"
Margin="3" HorizontalAlignment="Left"
Font="{./Font}" />
</Border>
</Template>
<Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
<VerticalStack Name="ItemsContainer"/>
</Border>
</Popper>
</Template>
</MenuItem>
</ItemTemplate>
</MenuItem>
|