blob: aee3649b394cd8e6fb48739f4a4d137026ba8619 (
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
|
<Menu Data="{AllCommands}">
<ItemTemplate DataType="Command">
<MenuItem Command="{}" Fit="true"/>
</ItemTemplate>
<ItemTemplate DataType="CommandGroup">
<MenuItem Caption="{Caption}" Fit="true">
<Template>
<ListItem>
<Popper Font="{./Font}" Caption="{./Caption}" Background="{./Background}" PopDirection="{./PopDirection}"
Foreground = "{./Foreground}" CanPop="{./HasChildren}"
IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
<Template>
<CheckBox IsChecked="{²./IsPopped}" Caption="{./Caption}" Background="{./Background}" Foreground="{./Foreground}">
<Template>
<Border Name="border1"
MinimumSize = "60,0"
Foreground="Transparent"
Background="{./Background}">
<Label Text="{./Caption}"
Foreground="{./Foreground}"
Margin="2" HorizontalAlignment="Left"
Font="{./Font}" />
</Border>
</Template>
</CheckBox>
</Template>
<Border Foreground="Red" Width="{../PopWidth}" Height="{../PopHeight}" Background="${MenuBackground}">
<VerticalStack Name="ItemsContainer" Width="Stretched" />
</Border>
</Popper>
</ListItem>
</Template>
<ListBox Data="{Commands}" Fit="true">
<ItemTemplate>
<MenuItem Command="{}" Fit="true"/>
</ItemTemplate>
</ListBox>
</MenuItem>
</ItemTemplate>
</Menu>
|