All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
2.0 KiB

<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridAdvancedContextMenuView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:view="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:s="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="Advanced ContextMenu"
VerticalScrollBarVisibility="Disabled">
<local:DemoView.Description>
<Paragraph FontSize="14"
FontFamily="Segoe">
By default the PropertyGrid provides a context menu for all the properties for a given object. You can override this behavior by setting the ShowAdvancedOptions property to True, and then use the AdvancedOptionsMenu property to provide a custom context menu for the properties.
</Paragraph>
</local:DemoView.Description>
<local:DemoView.Resources>
<ResourceDictionary>
<xctk:PropertyGridContextMenu x:Key="AdvancedOptionsMenu">
<MenuItem Header="Copy"
Click="MenuItem_Click" />
</xctk:PropertyGridContextMenu>
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<xctk:PropertyGrid x:Name="_propertyGrid"
Width="450"
MaxHeight="245"
Margin="10"
ShowAdvancedOptions="True"
SelectedObject="{Binding}"
AdvancedOptionsMenu="{StaticResource AdvancedOptionsMenu}">
</xctk:PropertyGrid>
</Grid>
</local:DemoView>