UIElement.StylusPlugIns UIElement.StylusPlugIns UIElement.StylusPlugIns UIElement.StylusPlugIns Property

定義

取得與這個項目關聯的所有手寫筆外掛程式 (自訂) 物件集合。Gets a collection of all stylus plug-in (customization) objects associated with this element.

protected:
 property System::Windows::Input::StylusPlugIns::StylusPlugInCollection ^ StylusPlugIns { System::Windows::Input::StylusPlugIns::StylusPlugInCollection ^ get(); };
protected System.Windows.Input.StylusPlugIns.StylusPlugInCollection StylusPlugIns { get; }
member this.StylusPlugIns : System.Windows.Input.StylusPlugIns.StylusPlugInCollection
Protected ReadOnly Property StylusPlugIns As StylusPlugInCollection

屬性值

手寫筆外掛程式集合,做為特定的集合。The collection of stylus plug-ins, as a specialized collection.

範例

下列範例會建立DynamicRenderer執行個體,並將它加入至StylusPlugIns處理控制項的自訂筆墨的集合。The following example creates a DynamicRenderer instance and adds it to the StylusPlugIns collection for a custom ink handling control.

// 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)

備註

會填入這個集合的控制項範例是InkCanvasAn example of a control that populates this collection is InkCanvas. InkCanvas 新增DynamicRenderer做為集合項目,可讓DynamicRenderer手寫筆輸入與互動,並產生唯一的呈現方式,以驅動事件的手寫筆的回應。InkCanvas adds the DynamicRenderer as a collection item, which enables the DynamicRenderer to interact with stylus input and produce the unique rendering in response to stylus driven events.

如需建立自訂外掛程式,可以接收及解譯手寫筆輸入,請參閱 < 自手寫筆的 輸入攔截For information on creating custom plug-ins that can receive and interpret stylus input, see Intercepting Input from the Stylus.

適用於

另請參閱