ExtendedPropertyValueEditor - класс
Обновлен: Ноябрь 2007
Контейнер для логики расширенного редактора свойств.
Пространство имен: Microsoft.Windows.Design.PropertyEditing
Сборка: Microsoft.Windows.Design (в Microsoft.Windows.Design.dll)
Синтаксис
'Декларация
Public Class ExtendedPropertyValueEditor _
Inherits PropertyValueEditor
'Применение
Dim instance As ExtendedPropertyValueEditor
public class ExtendedPropertyValueEditor : PropertyValueEditor
public ref class ExtendedPropertyValueEditor : public PropertyValueEditor
public class ExtendedPropertyValueEditor extends PropertyValueEditor
Заметки
Класс ExtendedPropertyValueEditor может содержать два объекта DataTemplate — по одному для встроенного и расширенного редакторов. Встроенный редактор предоставляет пользовательский интерфейс, который отображается в окне «Свойства». Расширенный редактор предоставляет интерфейс, отображаемый в новом окне.
В свойстве InlineEditorTemplate возвращается шаблон XAML для графического интерфейса пользователя встроенного редактора. В свойстве ExtendedEditorTemplate возвращается шаблон XAML для расширенного редактора. Обычно они предоставляются в объекте ResourceDictionary в другом месте проекта.
Объект EditModeSwitchButton предназначен для вызова пользовательского объекта ExtendedPropertyValueEditor. См. демонстрацию в разделе Пошаговое руководство. Реализация редактора цвета.
Примеры
В следующем примере кода показано применение класса ExtendedPropertyValueEditor. Дополнительные сведения см. в разделе Пошаговое руководство. Реализация редактора цвета.
' Demonstrates creating a class that inherits ExtendedPropertyValueEditor
' and setting the ExtendedEditorTemplate and InlineEditorTemplate properties.
Public Class BrushExtendedEditor
Inherits ExtendedPropertyValueEditor
' The EditorResources class in this example inherits ResourceDirectory and
' contains the template for the extended editor and the inline editor. This would be defined in
' an associated XAML file named EditorResources.xaml
Private res As New EditorResources()
Public Sub New()
Me.ExtendedEditorTemplate = CType(res("BrushExtendedEditorTemplate"), DataTemplate)
Me.InlineEditorTemplate = CType(res("BrushInlineEditorTemplate"), DataTemplate)
End Sub
End Class
// Demonstrates creating a class that inherits ExtendedPropertyValueEditor
// and setting the ExtendedEditorTemplate and InlineEditorTemplate properties.
public class BrushExtendedEditor : ExtendedPropertyValueEditor
{
// The EditorResources class in this example inherits ResourceDictionary
// class contains template for the inline editor and the extended editor. These would be
// defined in an associated XAML file named EditorResources.xaml
private EditorResources res = new EditorResources();
public BrushExtendedEditor()
{
this.ExtendedEditorTemplate = res["BrushExtendedEditorTemplate"] as DataTemplate;
this.InlineEditorTemplate = res["BrushInlineEditorTemplate"] as DataTemplate;
}
}
Иерархия наследования
System.Object
Microsoft.Windows.Design.PropertyEditing.PropertyValueEditor
Microsoft.Windows.Design.PropertyEditing.ExtendedPropertyValueEditor
Потокобезопасность
Любые открытые члены этого типа, объявленные как static (Shared в Visual Basic), являются потокобезопасными. Потокобезопасность членов экземпляров не гарантируется.
См. также
Ссылки
ExtendedPropertyValueEditor - члены
Microsoft.Windows.Design.PropertyEditing - пространство имен
Другие ресурсы
Архитектура редактирования свойства