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筆的輸入互動, 並產生唯一的轉譯, 以回應手寫筆驅動的事件。 DynamicRendererInkCanvas 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.

適用於

另請參閱