更新 : 2007 年 11 月
プロパティのすべての拡張エディタ ロジックのコンテナです。
名前空間 : 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 クラスは、2 つの DataTemplate オブジェクトを保持できます。1 つはインライン エディタ用で、もう 1 つは拡張エディタ用です。インライン エディタは [プロパティ] ウィンドウの境界内に表示されるカスタム インターフェイスを提供し、拡張エディタは新しいウィンドウに表示されるインターフェイスを提供します。
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 (Visual Basic では Shared) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
参照
参照
ExtendedPropertyValueEditor メンバ
Microsoft.Windows.Design.PropertyEditing 名前空間