DynamicRenderer 類別

定義

當使用者移動 Tablet 畫筆時,在表面上繪製筆墨。

public ref class DynamicRenderer : System::Windows::Input::StylusPlugIns::StylusPlugIn
public class DynamicRenderer : System.Windows.Input.StylusPlugIns.StylusPlugIn
type DynamicRenderer = class
    inherit StylusPlugIn
Public Class DynamicRenderer
Inherits StylusPlugIn
繼承
DynamicRenderer

範例

下列範例示範如何將 附加 DynamicRendererInkPresenter 。 若要建立動態轉譯筆跡的控制項,請參閱 建立筆跡輸入控制項

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

備註

類別 DynamicRenderer 繼承自 StylusPlugIn 類別,並允許筆跡在使用者使用平板電腦畫筆或其他指向裝置移動滑鼠指標時轉譯至表面。 您可以使用 DynamicRenderer 在自訂控制項上動態轉譯筆跡,或繼承自 DynamicRenderer ,在已啟用筆跡的元素上即時執行自訂轉譯,例如 InkCanvas

當使用者使用平板電腦畫筆輸入筆跡時,動態轉譯會在與應用程式的使用者介面執行緒分開的執行緒上完成。 使用滑鼠時,動態轉譯會在 UI 執行緒上完成。

注意

若要將此類別參考為 XAML 元素,您必須將 System.Windows.Input.StylusPlugIns CLR 命名空間對應至前置詞,並使用該前置詞來限定 DynamicRenderer 專案。 如需詳細資訊,請參閱 WPF XAML 的 XAML 命名空間和命名空間對應

XAML 文字使用方式

這個類別通常不會在 XAML 中使用。

建構函式

DynamicRenderer()

初始化 DynamicRenderer 類別的新執行個體。

屬性

DrawingAttributes

取得或設定指定呈現之筆墨外觀的 DrawingAttributes

Element

取得 UIElement 附加上去的 StylusPlugIn

(繼承來源 StylusPlugIn)
ElementBounds

取得項目的快取週框。

(繼承來源 StylusPlugIn)
Enabled

取得或設定 StylusPlugIn 是否為作用中。

(繼承來源 StylusPlugIn)
IsActiveForInput

取得 StylusPlugIn 是否能接受輸入的資訊。

(繼承來源 StylusPlugIn)
RootVisual

取得 DynamicRenderer 的根視覺。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetDispatcher()

傳回呈現執行緒的 Dispatcher

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnAdded()

發生於 DynamicRenderer 加入至項目時。

OnDraw(DrawingContext, StylusPointCollection, Geometry, Brush)

即時繪製筆墨,使筆墨看起來像是「順著」Tablet 畫筆或其他指向裝置出現一樣。

OnDrawingAttributesReplaced()

發生於 DrawingAttributes 屬性變更時。

OnEnabledChanged()

發生於 Enabled 屬性變更時。

OnIsActiveForInputChanged()

發生於 IsActiveForInput 屬性變更時。

OnRemoved()

發生於從項目移除 StylusPlugIn 時。

OnStylusDown(RawStylusInput)

當 Tablet 畫筆碰觸到數位板時,發生於畫筆執行緒集區中的執行緒上。

OnStylusDownProcessed(Object, Boolean)

當 Tablet 畫筆碰觸到數位板時,發生於應用程式 UI (使用者介面) 執行緒上。

OnStylusEnter(RawStylusInput, Boolean)

當手寫筆游標進入項目的範圍時,發生於畫筆執行緒上。

OnStylusLeave(RawStylusInput, Boolean)

當手寫筆游標離開項目的範圍時,發生於畫筆執行緒上。

OnStylusMove(RawStylusInput)

當 Tablet 畫筆在數位板上移動時,發生於畫筆執行緒上。

OnStylusMoveProcessed(Object, Boolean)

當 Tablet 畫筆在數位板上移動時,發生於應用程式 UI (使用者介面) 執行緒上。

(繼承來源 StylusPlugIn)
OnStylusUp(RawStylusInput)

當使用者從數位板上拿起 Tablet 畫筆時,發生於畫筆執行緒上。

OnStylusUpProcessed(Object, Boolean)

當使用者從數位板上拿起 Tablet 畫筆時,發生於應用程式 UI (使用者介面) 執行緒上。

Reset(StylusDevice, StylusPointCollection)

清除目前筆劃的呈現並重新繪製。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於