共用方式為


Strokes.ModifyDrawingAttributes 方法

設定 Strokes 集合中所有 Stroke 物件的 DrawingAttributes 屬性。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink (在 Microsoft.Ink.dll 中)

語法

'宣告
Public Sub ModifyDrawingAttributes ( _
    da As DrawingAttributes _
)
'用途
Dim instance As Strokes
Dim da As DrawingAttributes

instance.ModifyDrawingAttributes(da)
public void ModifyDrawingAttributes(
    DrawingAttributes da
)
public:
void ModifyDrawingAttributes(
    DrawingAttributes^ da
)
public void ModifyDrawingAttributes(
    DrawingAttributes da
)
public function ModifyDrawingAttributes(
    da : DrawingAttributes
)

參數

範例

在這個範例中,會修改 Strokes 集合的 DrawingAttributes

' Access to the Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using allStrokes As Strokes = mInkOverlay.Ink.Strokes
    Dim theDrawingAttributes As DrawingAttributes = New DrawingAttributes(Color.Chartreuse)
    theDrawingAttributes.Width = 42.0F
    theDrawingAttributes.Transparency = 50
    allStrokes.ModifyDrawingAttributes(theDrawingAttributes)
End Using
// Access to the Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes allStrokes = mInkOverlay.Ink.Strokes)
{
    DrawingAttributes theDrawingAttributes = new DrawingAttributes(Color.Chartreuse);
    theDrawingAttributes.Width = 42.0f;
    theDrawingAttributes.Transparency = 50;
    allStrokes.ModifyDrawingAttributes(theDrawingAttributes);
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

Strokes 類別

Strokes 成員

Microsoft.Ink 命名空間

DrawingAttributes

Stroke