wpf-demos/propertygrid/Configure at Runtime/ConfigureAtRuntimeDemo.xaml

76 строки
3.4 KiB
XML

<democommon:DemoControl
x:Class="syncfusion.propertygriddemos.wpf.ConfigureAtRuntimeDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:democommon="clr-namespace:syncfusion.demoscommon.wpf;assembly=syncfusion.demoscommon.wpf"
xmlns:local="clr-namespace:syncfusion.propertygriddemos.wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sync="http://schemas.syncfusion.com/wpf"
xmlns:syncfusion="clr-namespace:Syncfusion.Windows.PropertyGrid;assembly=Syncfusion.PropertyGrid.Wpf"
xmlns:shared="clr-namespace:Syncfusion.Windows.Edit;assembly=Syncfusion.Edit.Wpf"
OptionsSize="Auto"
mc:Ignorable="d">
<democommon:DemoControl.DataContext>
<local:ConfigureAtRuntimeViewModel />
</democommon:DemoControl.DataContext>
<democommon:DemoControl.Resources>
<local:StringToEnumConverter x:Key="stringToEnum" />
<local:DoubleToGridLengthConverter x:Key="doubleToGridLength" />
<x:Array x:Key="visibilitylist" Type="{x:Type Visibility}">
<Visibility>Visible</Visibility>
<Visibility>Collapsed</Visibility>
</x:Array>
</democommon:DemoControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid
Grid.Column="0"
MaxWidth="500"
MaxHeight="600"
Margin="20">
<syncfusion:PropertyGrid
x:Name="propertygrid"
AutoGeneratingPropertyGridItem="Propertygrid_AutoGeneratingPropertyGridItem"
ButtonPanelVisibility="{Binding ButtonPanelVisibility}"
DefaultPropertyPath="Age"
DescriptionPanelVisibility="{Binding DescriptionPanelVisibility}"
EnableGrouping="{Binding EnableGrouping}"
EnableToolTip="{Binding EnableToolTip}"
PropertyExpandMode="{Binding PropertyExpandMode}"
PropertyNameColumnDefinition="{Binding PropertyNameColumnDefinition, Mode=TwoWay}"
SearchBoxVisibility="{Binding SearchBoxVisibility}"
SelectedPropertyItem="{Binding SelectedPropertyItem, Mode=TwoWay}"
SortDirection="{Binding SortDirection}">
<syncfusion:PropertyGrid.SelectedObject>
<local:RuntimePerson />
</syncfusion:PropertyGrid.SelectedObject>
</syncfusion:PropertyGrid>
</Grid>
<sync:TabControlExt
x:Name="tabControlExt"
CloseButtonType="Hide"
ShowTabListContextMenu="False"
Grid.Column="1">
<sync:TabItemExt
Header="Person's properties">
<democommon:SourceCodeViewer FilePath="Assets\PropertyGrid\ConfigureAtRuntimeSource.cs"/>
</sync:TabItemExt>
<sync:TabItemExt
IsSelected="True"
Header="Definition at Runtime">
<democommon:SourceCodeViewer FilePath="Assets\PropertyGrid\AutoGeneratingPropertyGridItemSource.cs"/>
</sync:TabItemExt>
</sync:TabControlExt>
</Grid>
</democommon:DemoControl>