1 namespace System.Activities.Presentation.PropertyEditing {
8 /// Container for any and all exended editor logic for properties. This class can hold
9 /// two DataTemplates - one for Inline editor and one for Extended editor.
11 public class ExtendedPropertyValueEditor : PropertyValueEditor {
13 private DataTemplate _extendedEditorTemplate;
16 /// Creates an ExtendedPropertyValueEditor
18 public ExtendedPropertyValueEditor()
19 : this(null, null) { }
22 /// Creates an ExtendedPropertyValueEditor with the specified extended and inline editor
25 /// <param name="extendedEditorTemplate">The DataTemplate used for the extended popup/pinned editor.
26 /// When used, its DataContext will be set to a PropertyValue</param>
27 /// <param name="inlineEditorTemplate">The DataTemplate used for the inline editor.
28 /// When used, its DataContext will be set to a PropertyValue</param>
29 public ExtendedPropertyValueEditor(DataTemplate extendedEditorTemplate, DataTemplate inlineEditorTemplate)
30 : base(inlineEditorTemplate) {
31 _extendedEditorTemplate = extendedEditorTemplate;
35 /// The DataTemplate used for the extended popup/pinned editor.
36 /// Its DataContext will be set to a PropertyValue
38 [Fx.Tag.KnownXamlExternalAttribute]
39 public DataTemplate ExtendedEditorTemplate
41 get { return _extendedEditorTemplate; }
42 set { _extendedEditorTemplate = value; }
45 internal override DataTemplate GetPropertyValueEditor(PropertyContainerEditMode mode) {
46 return base.GetPropertyValueEditor(mode) ??
47 ((mode == PropertyContainerEditMode.ExtendedPinned ||
48 mode == PropertyContainerEditMode.ExtendedPopup) ? _extendedEditorTemplate : (DataTemplate)null);