UIElement.StylusPlugIns 屬性

定義

取得與這個項目關聯的所有手寫筆外掛程式 (自訂) 物件集合。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

屬性值

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.

適用於

另請參閱