次の方法で共有


DrawingAttributes コンストラクタ (Color)

指定した Color オブジェクトを使用して、DrawingAttributes クラスの新しいインスタンスを初期化します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public Sub New ( _
    color As Color _
)
'使用
Dim color As Color

Dim instance As New DrawingAttributes(color)
public DrawingAttributes(
    Color color
)
public:
DrawingAttributes(
    Color color
)
public DrawingAttributes(
    Color color
)
public function DrawingAttributes(
    color : Color
)

パラメータ

解説

ストロークの描画属性を変更する場合は、毎回新しいオブジェクトを作成するのではなく、既存の DrawingAttributes オブジェクトを再利用してみてください。新しい DrawingAttributes オブジェクトを作成すると、DrawingAttributes オブジェクトの有効期間を超えて、Ink オブジェクトに残されたメモリが割り当てられます。

この C# の例では、特定の色を使用して、DrawingAttributes クラス theDrawingAttributes の新しいインスタンスを初期化します。

DrawingAttributes theDrawingAttributes = new DrawingAttributes(Color.Red);

この Microsoft Visual Basic.NET の例では、特定の色を使用して、DrawingAttributes クラス theDrawingAttributes の新しいインスタンスを初期化します。

Dim theDrawingAttributes As New DrawingAttributes(Color.Red)

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

DrawingAttributes クラス

DrawingAttributes メンバ

DrawingAttributes オーバーロード

Microsoft.Ink 名前空間

DrawingAttributes