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.
195 lines
9.1 KiB
195 lines
9.1 KiB
<!--**************************************************************************************
|
|
|
|
Extended WPF Toolkit
|
|
|
|
Copyright (C) 2007-2015 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the Microsoft Public
|
|
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at http://xceed.com/wpf_toolkit
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
************************************************************************************-->
|
|
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
|
VerticalScrollBarVisibility="Disabled"
|
|
Title="PropertyGrid">
|
|
<local:DemoView.Description>
|
|
<Paragraph FontSize="14"
|
|
FontFamily="Segoe">
|
|
The PropertyGrid control allows you to view and edit the properties of a specific object instance,
|
|
or values from a list of custom objects. This PropertyGrid allows you to autogenerate all properties
|
|
or specify the specific properties you want to display. You can use the standard editors that are provided
|
|
with the PropertyGrid or you can use custom editors that target a type, specific properties, or both.
|
|
The PropertyGrid also supports complex properties, which allows you to drill down into a nested property hierarchy.
|
|
</Paragraph>
|
|
</local:DemoView.Description>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<GroupBox Header="Features"
|
|
Grid.Row="0"
|
|
Margin="5">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- 1st column-->
|
|
<TextBlock Text="Show Sumary:"
|
|
VerticalAlignment="Center" />
|
|
<CheckBox Grid.Column="1"
|
|
IsChecked="{Binding ShowSummary, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Shows/Hides the summary panel of the PropertyGrid." />
|
|
<TextBlock Text="Filter:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="1" />
|
|
<xctk:WatermarkTextBox Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="175"
|
|
Watermark="Search"
|
|
Text="{Binding Filter, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Filters the properties within the PropertyGrid." />
|
|
<TextBlock Text="IsReadOnly:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="2"
|
|
Grid.Column="0" />
|
|
<CheckBox Grid.Row="2"
|
|
Grid.Column="1"
|
|
IsChecked="{Binding IsReadOnly, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Set the IsReadOnly property to true or false." />
|
|
<TextBlock Text="ShowPreview:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="3"
|
|
Grid.Column="0" />
|
|
<CheckBox Grid.Row="3"
|
|
Grid.Column="1"
|
|
IsChecked="{Binding ShowPreview, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Shows/Hides the selected object preview." />
|
|
|
|
<!--2nd column-->
|
|
<TextBlock Text="Is Categorized:"
|
|
VerticalAlignment="Center"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0" />
|
|
<CheckBox Grid.Column="3"
|
|
IsChecked="{Binding IsCategorized, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Gets/Sets the layout of the PropertyGrid." />
|
|
<TextBlock Text="Is Misc Category Label Hidden:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0" />
|
|
<CheckBox Grid.Row="1"
|
|
Grid.Column="3"
|
|
IsChecked="{Binding IsMiscCategoryLabelHidden, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Gets/Sets is the Misc Category label should be hidden." />
|
|
<TextBlock Text="Show Advanced Options:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0" />
|
|
<CheckBox Grid.Row="2"
|
|
Grid.Column="3"
|
|
IsChecked="{Binding ShowAdvancedOptions, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Shows/Hides the advanced options menu next to a property." />
|
|
<TextBlock Text="UpdateTextBoxSourceOnEnterKey:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="3"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0" />
|
|
<CheckBox Grid.Row="3"
|
|
Grid.Column="3"
|
|
IsChecked="{Binding UpdateTextBoxSourceOnEnterKey, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="Update the source of a TextBox when True and Enter key is pressed." />
|
|
<TextBlock Text="HideInheritedProperties:"
|
|
VerticalAlignment="Center"
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0" />
|
|
<CheckBox Grid.Row="4"
|
|
Grid.Column="3"
|
|
IsChecked="{Binding HideInheritedProperties, ElementName=_propertyGrid}"
|
|
VerticalAlignment="Center"
|
|
Margin="5"
|
|
ToolTip="When True, inherited properties are hidden." />
|
|
|
|
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<DockPanel Grid.Row="1"
|
|
Margin="10">
|
|
|
|
<TextBlock DockPanel.Dock="Top"
|
|
Text="Usage:"
|
|
Style="{StaticResource Header}" />
|
|
<TextBlock DockPanel.Dock="Top"
|
|
Text="Edit the values in the PropertyGrid to see the effect on the button."
|
|
TextWrapping="Wrap" />
|
|
<Grid Margin="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="150" />
|
|
<ColumnDefinition MaxWidth="530" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button x:Name="_button"
|
|
Height="100"
|
|
Width="100"
|
|
Margin="20"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">Button</Button>
|
|
|
|
<xctk:PropertyGrid Grid.Column="1"
|
|
x:Name="_propertyGrid"
|
|
ShowSummary="True"
|
|
Filter=""
|
|
IsCategorized="True"
|
|
ShowAdvancedOptions="True"
|
|
IsReadOnly="False"
|
|
UpdateTextBoxSourceOnEnterKey="True"
|
|
IsMiscCategoryLabelHidden="False"
|
|
ShowPreview="True"
|
|
HideInheritedProperties="False"
|
|
SelectedObject="{Binding ElementName=_button}">
|
|
</xctk:PropertyGrid>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Grid>
|
|
</local:DemoView>
|
|
|