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.
60 lines
3.4 KiB
60 lines
3.4 KiB
<!--**************************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2020 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
|
|
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
|
|
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
************************************************************************************-->
|
|
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridSpecifyingPropertiesView"
|
|
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 Specifying Properties">
|
|
<local:DemoView.Description>
|
|
<Paragraph FontSize="14" FontFamily="Segoe">
|
|
By default the propertyGrid will autogenerate all the properties for a given object. You can override this behavior by setting the AutoGenerateProperties property to False, and then provide a collection of PropertyDefinitions of the properties you would like to show.
|
|
</Paragraph>
|
|
</local:DemoView.Description>
|
|
|
|
<Grid>
|
|
<xctk:PropertyGrid x:Name="_propertyGrid"
|
|
Width="450"
|
|
MaxHeight="245"
|
|
Margin="10"
|
|
AutoGenerateProperties="False">
|
|
|
|
<xctk:PropertyGrid.PropertyDefinitions>
|
|
<!-- The following properties will be displayed in the PropertyGrid
|
|
Some properties' data will be overriden-->
|
|
<xctk:PropertyDefinition TargetProperties="FirstName,PetNames" DisplayOrder="0"/>
|
|
<xctk:PropertyDefinition TargetProperties="FavoriteColor"
|
|
DisplayName="Shirt Color"
|
|
Category="Clothes"
|
|
Description="The color of the Person's shirt can be changed with the ColorPicker."
|
|
IsExpandable="True">
|
|
<!--The following properties will be displayed in the "Shirt Color" expandable PropertyItem-->
|
|
<xctk:PropertyDefinition.PropertyDefinitions>
|
|
<xctk:PropertyDefinition TargetProperties="R,G,B"/>
|
|
</xctk:PropertyDefinition.PropertyDefinitions>
|
|
</xctk:PropertyDefinition>
|
|
<!-- And all properties of type Boolean will be displayed in the PropertyGrid-->
|
|
<xctk:PropertyDefinition TargetProperties="{x:Type s:Boolean}" DisplayOrder="1"/>
|
|
|
|
<!-- This Property won't be displayed -->
|
|
<xctk:PropertyDefinition TargetProperties="WritingHand" IsBrowsable="False"/>
|
|
</xctk:PropertyGrid.PropertyDefinitions>
|
|
</xctk:PropertyGrid>
|
|
</Grid>
|
|
</local:DemoView>
|
|
|