InkPresenter.AttachVisuals(Visual, DrawingAttributes) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Koppelt de visual van een DynamicRenderer aan een InkPresenter.
public:
void AttachVisuals(System::Windows::Media::Visual ^ visual, System::Windows::Ink::DrawingAttributes ^ drawingAttributes);
public void AttachVisuals(System.Windows.Media.Visual visual, System.Windows.Ink.DrawingAttributes drawingAttributes);
member this.AttachVisuals : System.Windows.Media.Visual * System.Windows.Ink.DrawingAttributes -> unit
Public Sub AttachVisuals (visual As Visual, drawingAttributes As DrawingAttributes)
Parameters
- visual
- Visual
De visual van een DynamicRenderer.
- drawingAttributes
- DrawingAttributes
Hiermee DrawingAttributes geeft u het uiterlijk van de dynamisch gerenderde inkt aan.
Uitzonderingen
visual is al gekoppeld aan een visualstructuur.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de visual en DrawingAttributes een DynamicRenderer element koppelt aan een InkPresenter.
// 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)
Opmerkingen
Koppel de visual van een DynamicRenderer aan de InkPresenter visual om inkt dynamisch weer te geven op uw besturingselement.