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.
107 lines
6.6 KiB
107 lines
6.6 KiB
<!--**************************************************************************************
|
|
|
|
Extended WPF Toolkit
|
|
|
|
Copyright (C) 2007-2014 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" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="Show Sumary:" VerticalAlignment="Center" />
|
|
<CheckBox x:Name="_showSummary" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Shows/Hides the summary panel of the PropertyGrid." />
|
|
|
|
<TextBlock Text="Filter:" VerticalAlignment="Center" Grid.Row="1" />
|
|
<xctk:WatermarkTextBox x:Name="_filter"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="175"
|
|
Watermark="Search"
|
|
VerticalAlignment="Center" Margin="5" ToolTip="Filters the properties within the PropertyGrid." />
|
|
|
|
<TextBlock Text="Is Categorized:" VerticalAlignment="Center" Grid.Column="2" Margin="10,0,0,0"/>
|
|
<CheckBox x:Name="_isCategorized" Grid.Column="3" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Gets/Sets the layout of the PropertyGrid." />
|
|
|
|
<TextBlock Text="Show Advanced Options:" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2" Margin="10,0,0,0"/>
|
|
<CheckBox x:Name="_showAdvancedOptions" Grid.Row="1" Grid.Column="3" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Shows/Hides the advanced options menu next to a property." />
|
|
<TextBlock Text="IsReadOnly:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" />
|
|
<CheckBox x:Name="_isReadOnly" Grid.Row="2" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5" ToolTip="Set the IsReadOnly property to true or false." />
|
|
<TextBlock Text="UpdateTextBoxSourceOnEnterKey:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Margin="10,0,0,0"/>
|
|
<CheckBox x:Name="_updateTextBoxSourceOnEnterKey" Grid.Row="2" Grid.Column="3" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Update the source of a TextBox when True and Enter key is pressed." />
|
|
<TextBlock Text="ShowPreview:" VerticalAlignment="Center" Grid.Row="3" Grid.Column="0"/>
|
|
<CheckBox x:Name="_showPreview" Grid.Row="3" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Shows/Hides the selected object preview." />
|
|
</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="{Binding IsChecked, ElementName=_showSummary}"
|
|
Filter="{Binding Text, ElementName=_filter, Mode=TwoWay}"
|
|
IsCategorized="{Binding IsChecked, ElementName=_isCategorized, Mode=TwoWay}"
|
|
ShowAdvancedOptions="{Binding IsChecked, ElementName=_showAdvancedOptions}"
|
|
IsReadOnly="{Binding IsChecked, ElementName=_isReadOnly}"
|
|
UpdateTextBoxSourceOnEnterKey="{Binding IsChecked, ElementName=_updateTextBoxSourceOnEnterKey}"
|
|
ShowPreview="{Binding IsChecked, ElementName=_showPreview}"
|
|
SelectedObject="{Binding ElementName=_button}">
|
|
</xctk:PropertyGrid>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Grid>
|
|
</local:DemoView>
|
|
|