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.
87 lines
5.0 KiB
87 lines
5.0 KiB
<!--*********************************************************************
|
|
|
|
Extended WPF Toolkit
|
|
|
|
Copyright (C) 2010-2012 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
|
|
|
|
This program can be provided to you by Xceed Software Inc. under a
|
|
proprietary commercial license agreement for use in non-Open Source
|
|
projects. The commercial version of Extended WPF Toolkit also includes
|
|
priority technical support, commercial updates, and many additional
|
|
useful WPF controls if you license Xceed Business Suite for WPF.
|
|
|
|
Visit http://xceed.com and follow @datagrid on Twitter.
|
|
|
|
********************************************************************-->
|
|
<sample:DemoView x:Class="Samples.Modules.PropertyGrid.Views.HomeView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
Title="PropertyGrid" >
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="The PropertyGrid control allows you inspect and edit properties of an object. This PropertyGrid allows you do 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."
|
|
TextWrapping="Wrap" />
|
|
|
|
<GroupBox Header="Features" Grid.Row="1" Margin="5">
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="Display Sumary:" VerticalAlignment="Center" />
|
|
<CheckBox x:Name="_displaySummary" 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"
|
|
Watermark="Search"
|
|
VerticalAlignment="Center" Margin="5" ToolTip="Filters the properties within the PropertyGrid." />
|
|
|
|
<TextBlock Text="Is Categorized:" VerticalAlignment="Center" Grid.Column="2" />
|
|
<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" />
|
|
<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." />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<StackPanel Grid.Row="2" Margin="10">
|
|
<TextBlock Text="Usage:" Style="{StaticResource Header}" />
|
|
<TextBlock Text="To inspect an object simply set the PropertyGrid.SelectedObject property to an instance of the object you want to inspect."
|
|
TextWrapping="Wrap" />
|
|
<Grid Height="400" Margin="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button x:Name="_button" Height="200" Width="200" Margin="25" HorizontalAlignment="Center" VerticalAlignment="Center">Inspect Me</Button>
|
|
|
|
<xctk:PropertyGrid Grid.Column="1"
|
|
DisplaySummary="{Binding IsChecked, ElementName=_displaySummary}"
|
|
Filter="{Binding Text, ElementName=_filter, Mode=TwoWay}"
|
|
IsCategorized="{Binding IsChecked, ElementName=_isCategorized, Mode=TwoWay}"
|
|
ShowAdvancedOptions="{Binding IsChecked, ElementName=_showAdvancedOptions}"
|
|
SelectedObject="{Binding ElementName=_button}" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</Grid>
|
|
</sample:DemoView>
|
|
|