Compartilhar via


Classe ExtendedPropertyValueEditor

Contêiner para lógica de toda e qualquer editor estendida para propriedades.

Namespace:  Microsoft.Windows.Design.PropertyEditing
Assembly:  Microsoft.Windows.Design (em Microsoft.Windows.Design.dll)

Sintaxe

Public Class ExtendedPropertyValueEditor _
    Inherits PropertyValueEditor

Dim instance As ExtendedPropertyValueEditor
public class ExtendedPropertyValueEditor : PropertyValueEditor
public ref class ExtendedPropertyValueEditor : public PropertyValueEditor
public class ExtendedPropertyValueEditor extends PropertyValueEditor

Comentários

The ExtendedPropertyValueEditor classe pode conter dois DataTemplate objetos, um para um embutido editor e um para um editor estendido. O embutido editor fornece uma interface personalizada que aparecem dentro dos limites da janela Propriedades e o editor estendido fornece uma interface que aparece em uma nova janela.

The InlineEditorTemplate propriedade retorna o modelo XAML para a interface visual para o embutido editor e o ExtendedEditorTemplate propriedade retorna o modelo XAML para o editor estendido. Eles geralmente são fornecidos em um ResourceDictionary em qualquer ponto do projeto.

Você deve usar o EditModeSwitchButton para chamar seu personalizado ExtendedPropertyValueEditorPara uma demonstração, consulte Demonstra Passo a passo: Implementando um Editor de cor.

Exemplos

O exemplo de código a seguir mostra como usar o ExtendedPropertyValueEditor classe. Para obter mais informações, consulte Demonstra Passo a passo: Implementando um Editor de cor.

' 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;
    }
}

Hierarquia de herança

System.Object
  Microsoft.Windows.Design.PropertyEditing.PropertyValueEditor
    Microsoft.Windows.Design.PropertyEditing.ExtendedPropertyValueEditor

Acesso thread-safe

Quaisquer membros static (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.

Consulte também

Referência

Membros ExtendedPropertyValueEditor

Namespace Microsoft.Windows.Design.PropertyEditing

Outros recursos

Propriedade de edição de arquitetura

Extensibilidade do WPF Designer

Armazenamento de metadados