UIElement.StylusPlugIns 屬性

定義

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

C#
protected System.Windows.Input.StylusPlugIns.StylusPlugInCollection StylusPlugIns { get; }

屬性值

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

範例

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

C#
// 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);

備註

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

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

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

另請參閱