25 lines
1.4 KiB
XML
25 lines
1.4 KiB
XML
<UserControl x:Class="HandyControlDemo.UserControl.MenuDemoCtl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
|
Background="{DynamicResource RegionBrush}">
|
|
<hc:TransitioningContentControl>
|
|
<hc:SimplePanel Margin="32">
|
|
<TextBlock Text="{x:Static langs:Lang.RightClickHere}" Foreground="{DynamicResource BorderBrush}" Style="{StaticResource TextBlockTitle}"/>
|
|
<Rectangle Width="200" Height="112" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
|
|
<Border Width="200" Height="112" Background="Transparent">
|
|
<Border.ContextMenu>
|
|
<ContextMenu ItemsSource="{Binding DataList}">
|
|
<ContextMenu.ItemTemplate>
|
|
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
|
|
<TextBlock Text="{Binding Name}"/>
|
|
</HierarchicalDataTemplate>
|
|
</ContextMenu.ItemTemplate>
|
|
</ContextMenu>
|
|
</Border.ContextMenu>
|
|
</Border>
|
|
</hc:SimplePanel>
|
|
</hc:TransitioningContentControl>
|
|
</UserControl>
|