共用方式為


Stroke 類別

定義

代表單一筆劃。

public ref class Stroke : System::ComponentModel::INotifyPropertyChanged
public class Stroke : System.ComponentModel.INotifyPropertyChanged
type Stroke = class
    interface INotifyPropertyChanged
Public Class Stroke
Implements INotifyPropertyChanged
繼承
Stroke
實作

備註

A Stroke 是從指點裝置(如繪圖筆或滑鼠)收集的資料物件。 可以 Stroke 程式化地建立與操作,並可在可使用墨水的元素上以視覺化方式表示, InkCanvas例如 。 A Stroke 包含其位置與外觀的資訊。 屬性 StylusPoints 是一組 StylusPoint 指定 位置 Stroke的物件集合。 該 DrawingAttributes 性質指定了筆劃的外觀。

建構函式

名稱 Description
Stroke(StylusPointCollection, DrawingAttributes)

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

Stroke(StylusPointCollection)

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

屬性

名稱 Description
DrawingAttributes

取得或設定物件的 StrokeDrawingAttributes

StylusPoints

回傳 . 的觸控筆點 Stroke數。

方法

名稱 Description
AddPropertyData(Guid, Object)

為物件新增自訂屬性 Stroke

Clone()

回傳現有 Stroke 物件的深度副本。

ContainsPropertyData(Guid)

回傳一個值,指示物件是否 Stroke 包含指定的自訂屬性。

Draw(DrawingContext, DrawingAttributes)

根據指定的 DrawingContextDrawingAttributes來渲染物件。Stroke

Draw(DrawingContext)

根據指定的 DrawingContext渲染物件。Stroke

DrawCore(DrawingContext, DrawingAttributes)

在指定的 DrawingContext 上渲染 ,Stroke使用指定的 DrawingAttributes

Equals(Object)

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

(繼承來源 Object)
GetBezierStylusPoints()

回傳觸控筆點 ,當 StrokeFitToCurvetrue時 。

GetBounds()

取得該物件的 Stroke 包圍盒。

GetClipResult(IEnumerable<Point>)

回傳在指定範圍內的電流 Stroke 區段。

GetClipResult(Rect)

回傳位於指定矩形內的電流 Stroke 區段。

GetEraseResult(IEnumerable<Point>, StylusShape)

經指定路徑切割後,回傳電流StylusShape的區段Stroke

GetEraseResult(IEnumerable<Point>)

回傳超出指定範圍的電流 Stroke 區段。

GetEraseResult(Rect)

回傳超出指定矩形的電流 Stroke 區段。

GetGeometry()

得到 Geometry 電流 Stroke的 。

GetGeometry(DrawingAttributes)

利用指定的 DrawingAttributes得到Geometry電流Stroke的 。

GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetPropertyData(Guid)

取得指定 GUID 的屬性資料。

GetPropertyDataIds()

擷取與 Stroke 物件相關的任何自訂屬性的 GUID。

GetType()

取得目前實例的 Type

(繼承來源 Object)
HitTest(IEnumerable<Point>, Int32)

回傳一個表示電流 Stroke 是否在指定範圍內的值。

HitTest(IEnumerable<Point>, StylusShape)

回傳指定路徑是否與 相 Stroke 交,使用指定的 StylusShape

HitTest(Point, Double)

回傳一個值,表示電流 Stroke 是否與指定區域相交。

HitTest(Point)

回傳一個表示電流 Stroke 是否與指定點相交的值。

HitTest(Rect, Int32)

回傳一個值,表示 是否 Stroke 在指定矩形範圍內。

MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
OnDrawingAttributesChanged(PropertyDataChangedEventArgs)

允許衍生類別修改事件的 DrawingAttributesChanged 預設行為。

OnDrawingAttributesReplaced(DrawingAttributesReplacedEventArgs)

允許衍生類別修改事件的 DrawingAttributesReplaced 預設行為。

OnInvalidated(EventArgs)

引發 Invalidated 事件。

OnPropertyChanged(PropertyChangedEventArgs)

當任何 Stroke 房產發生變動時。

OnPropertyDataChanged(PropertyDataChangedEventArgs)

允許衍生類別修改事件的 PropertyDataChanged 預設行為。

OnStylusPointsChanged(EventArgs)

引發 StylusPointsChanged 事件。

OnStylusPointsReplaced(StylusPointsReplacedEventArgs)

引發 StylusPointsReplaced 事件。

RemovePropertyData(Guid)

刪除物件中的 Stroke 自訂屬性。

ToString()

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

(繼承來源 Object)
Transform(Matrix, Boolean)

根據指定的 Matrix 物件執行轉換。

事件

名稱 Description
DrawingAttributesChanged

當與Stroke物件相關的事物DrawingAttributes發生變化時。

DrawingAttributesReplaced

當物件的繪圖屬性 Stroke 被替換時,會發生這種情況。

Invalidated

當外觀 Stroke 發生變化時。

PropertyDataChanged

當物件的自訂屬性 Stroke 改變時會發生。

StylusPointsChanged

當房產變更時 StylusPoints 發生。

StylusPointsReplaced

當屬性 StylusPoints 被指派到新的 StylusPointCollection時,會發生這種情況。

明確介面實作

名稱 Description
INotifyPropertyChanged.PropertyChanged

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

當任何 Stroke 房產價值發生變化時,就會發生這種情況。

適用於

另請參閱