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.
100 lines
4.4 KiB
100 lines
4.4 KiB
<!--**************************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2025 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.PropertyGridAttributesView"
|
|
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:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:col="clr-namespace:System.Collections;assembly=mscorlib"
|
|
xmlns:v="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views"
|
|
x:Name="demo"
|
|
VerticalScrollBarVisibility="Disabled"
|
|
Title="Using Attributes">
|
|
<local:DemoView.Description>
|
|
<Paragraph FontSize="14" FontFamily="Segoe">
|
|
This sample shows how you can use Attributes to customize the display of the properties in the PropertyGrid.
|
|
With attributes you can, for each property, customize their own category, display property, display name, display order, description, editor, editor combox items,
|
|
and expandability (drill down). Here is the list of all supported attributes:
|
|
<LineBreak />
|
|
<LineBreak />
|
|
BrowsableAttribute
|
|
<LineBreak />
|
|
DisplayNameAttribute
|
|
<LineBreak/>
|
|
DescriptionAttribute
|
|
<LineBreak/>
|
|
CategoryAttribute
|
|
<LineBreak/>
|
|
CategoryOrderAttribute
|
|
<LineBreak/>
|
|
EditorAttribute
|
|
<LineBreak/>
|
|
NewItemTypesAttribute
|
|
<LineBreak/>
|
|
ExpandableObjectAttribute
|
|
<LineBreak/>
|
|
ItemsSourceAttribute
|
|
<LineBreak/>
|
|
PropertyOrderAttribute
|
|
<LineBreak/>
|
|
ParenthesizePropertyNameAttribute
|
|
<LineBreak/>
|
|
<LineBreak/>
|
|
Plus edition Only:
|
|
<LineBreak />
|
|
DependsOnAttribute
|
|
<LineBreak/>
|
|
(Not demoed here. See corresponding samples)
|
|
<LineBreak />
|
|
ExpandedCategoryAttribute
|
|
<LineBreak/>
|
|
DefinitionKeyAttribute
|
|
<LineBreak/>
|
|
LocalizedCategoryAttribute
|
|
<LineBreak/>
|
|
LocalizedDisplayNameAttribute
|
|
<LineBreak/>
|
|
LocalizedDescriptionAttribute
|
|
</Paragraph>
|
|
</local:DemoView.Description>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="10">
|
|
<TextBlock Text="Each property in this PropertyGrid has its own special attribute that applies a different effect when it is displayed."
|
|
TextWrapping="Wrap" Margin="5"/>
|
|
<TextBlock Text="Select each property one-by-one and take a look at the description section to learn more about each attribute."
|
|
TextWrapping="Wrap" Margin="5"/>
|
|
<TextBlock Text="All properties define the CategoryAttribute (eg. 'Information','Conections') and the DescriptionAttribute."
|
|
TextWrapping="Wrap" Margin="5"/>
|
|
<TextBlock Text="(CLick the XAML and Code tabs to see details.)"
|
|
FontStyle="Italic"
|
|
Margin="0,10,0,0"/>
|
|
</StackPanel>
|
|
|
|
<xctk:PropertyGrid Grid.Row="1" x:Name="_propertyGrid" Width="450" MaxHeight="650" Margin="10"
|
|
SelectedObject="{Binding}"
|
|
ShowDescriptionByTooltip="True">
|
|
</xctk:PropertyGrid>
|
|
|
|
</Grid>
|
|
</local:DemoView>
|
|
|