Share via


DynamicRenderer.DrawingAttributes Proprietà

Definizione

Ottiene o imposta l'oggetto DrawingAttributes che specifica l'aspetto dell'input penna di cui è stato eseguito il rendering.

public:
 property System::Windows::Ink::DrawingAttributes ^ DrawingAttributes { System::Windows::Ink::DrawingAttributes ^ get(); void set(System::Windows::Ink::DrawingAttributes ^ value); };
public System.Windows.Ink.DrawingAttributes DrawingAttributes { get; set; }
member this.DrawingAttributes : System.Windows.Ink.DrawingAttributes with get, set
Public Property DrawingAttributes As DrawingAttributes

Valore della proprietà

DrawingAttributes

Oggetto DrawingAttributes che specifica l'aspetto dell'input penna di cui è stato eseguito il rendering.

Esempio

Nell'esempio seguente viene illustrato come creare un DrawingAttributes oggetto per un DynamicRendereroggetto . In questo esempio, l'input penna sottoposto a rendering dinamico corrisponde alle proprietà specificate da inkDA. Per creare un controllo che esegue il rendering dinamico dell'input penna, vedere Creazione di un controllo input penna.

// Create a DrawingAttributes to use for the 
// DynamicRenderer.
DrawingAttributes inkDA = new DrawingAttributes();
inkDA.Width = 5;
inkDA.Height = 5;
inkDA.Color = Colors.Purple;

// Add a dynamic renderer plugin that 
// draws ink as it "flows" from the stylus
DynamicRenderer dynamicRenderer1 = new DynamicRenderer();
dynamicRenderer1.DrawingAttributes = inkDA;

this.StylusPlugIns.Add(dynamicRenderer1);
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual,
    dynamicRenderer1.DrawingAttributes);
' Create a DrawingAttributes to use for the 
' DynamicRenderer.
Dim inkDA As New DrawingAttributes()
inkDA.Width = 5
inkDA.Height = 5
inkDA.Color = Colors.Purple

' Add a dynamic renderer plugin that 
' draws ink as it "flows" from the stylus
Dim dynamicRenderer1 As New DynamicRenderer()
dynamicRenderer1.DrawingAttributes = inkDA

Me.StylusPlugIns.Add(dynamicRenderer1)
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual, dynamicRenderer1.DrawingAttributes)

Commenti

Utilizzo del testo XAML

Questa proprietà non viene in genere usata in XAML.

Si applica a