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.

23 lines
1.4 KiB

<infControls:DemoView x:Class="Samples.Modules.PropertyGrid.Views.CustomItemsSource"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
Title="Custom ItemsSource">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="Sometimes it is desirable to want to provide a collection of values represented by a ComboBox for a given property. The PropertyGrid supports this scenario by create a class that implements IItemsSource and decorating your property with the ItemsSourceAttribute."
TextWrapping="Wrap" />
<StackPanel Grid.Row="1" Margin="10">
<TextBlock Text="Providing a Custom ItemsSource:" Style="{StaticResource Header}" />
<TextBlock Text="This example uses a collection of Doubles to represent the available options for the WritingFontSize property." TextWrapping="Wrap"/>
<extToolkit:PropertyGrid x:Name="_propertyGrid" Width="450" Margin="10"/>
</StackPanel>
</Grid>
</infControls:DemoView>