UIElement.StylusPlugIns 屬性

定義

取得與這個項目關聯的所有手寫筆外掛程式 (自訂) 物件集合。

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

屬性值

手寫筆外掛程式集合,做為特定的集合。

範例

下列範例會 DynamicRenderer 建立 實例,並將它加入至自訂筆跡處理控制項的 StylusPlugIns 集合。

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

備註

填入這個集合的控制項範例為 InkCanvasInkCanvasDynamicRenderer會將 新增為集合專案,讓 DynamicRenderer 與手寫筆輸入互動,並產生唯一的轉譯,以回應手寫筆驅動事件。

如需建立可接收和解譯手寫筆輸入的自訂外掛程式的相關資訊,請參閱 攔截手寫筆的輸入

適用於

另請參閱