All the controls missing in WPF. Over 1 million downloads.
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.

69 lines
3.5 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.PropertyGridDefinitionKeyView"
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="Using DefinitionKeyAttribute">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
The DefinitionKey attribute can be assigned to properties of your selected object to define which EditorDefinition to
be applied to the property.
<LineBreak/>
<LineBreak/>
As an alternative to the Editor attribute, this allows you separate the UI-specific code from your
business model code.
<LineBreak/>
<LineBreak/>
It can also be used to specify a specific default editor when a property type does not resolve to a valid editor (e.g., Object).
<LineBreak />
<LineBreak />
<Run>This feature is only available in the "Plus" version.</Run>
<LineBreak />
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Extended WPF Toolkit Plus.
</Hyperlink>
</Paragraph>
</local:DemoView.Description>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="20">
<TextBlock Text="Here the FirstName and LastName DefinitionKey attribute refer to the same 'nameType' EditorDefinition"
TextWrapping="Wrap"
Margin="0,0,0,10"/>
<TextBlock Text="The ReferenceNo property, declare a DefinitionKey to 'int?' to displayed the content with a IntegerUpDown dispite it's type is 'object'"
TextWrapping="Wrap"
Margin="0,0,0,10"/>
</StackPanel>
<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto">
<StackPanel>
<TextBlock Text="C# :" Margin="0,10,0,0" />
<local:CSharpBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/DefinitionKey.cs.txt" />
<TextBlock Text="Xaml :" Margin="0,10,0,0" />
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/DefinitionKey.xaml.txt" />
</StackPanel>
</ScrollViewer>
</Grid>
</local:DemoView>