Browse Source

CollectionEditorDialog: added NewItemTypes property.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
e963e425bf
  1. 3
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Implementation/CollectionEditorDialog.xaml
  2. 8
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Implementation/CollectionEditorDialog.xaml.cs

3
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Implementation/CollectionEditorDialog.xaml

@ -13,7 +13,8 @@
<extToolkit:CollectionEditor x:Name="_propertyGrid"
ItemsSourceType="{Binding ItemsSourceType, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
NewItemTypes="{Binding NewItemTypes, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="5" >
<Button Width="75" Margin="2" Click="OkButton_Click" IsDefault="True">OK</Button>

8
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CollectionEditors/Implementation/CollectionEditorDialog.xaml.cs

@ -1,6 +1,7 @@
using System;
using System.Windows;
using System.Collections;
using System.Collections.Generic;
namespace Microsoft.Windows.Controls
{
@ -25,6 +26,13 @@ namespace Microsoft.Windows.Controls
set { SetValue(ItemsSourceTypeProperty, value); }
}
public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register("NewItemTypes", typeof(IList), typeof(CollectionEditorDialog), new UIPropertyMetadata(null));
public IList<Type> NewItemTypes
{
get { return (IList<Type>)GetValue(NewItemTypesProperty); }
set { SetValue(NewItemTypesProperty, value); }
}
#endregion //Properties
#region Constructors

Loading…
Cancel
Save