Stroke.DrawingAttributes 属性

获取或设置在绘制墨迹 时应用于该墨迹的绘制属性。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Property DrawingAttributes As DrawingAttributes
用法
Dim instance As Stroke
Dim value As DrawingAttributes

value = instance.DrawingAttributes

instance.DrawingAttributes = value
public DrawingAttributes DrawingAttributes { get; set; }
public:
property DrawingAttributes^ DrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
public DrawingAttributes get_DrawingAttributes()
/** @property */
public  void set_DrawingAttributes(DrawingAttributes value)
public function get DrawingAttributes () : DrawingAttributes
public function set DrawingAttributes (value : DrawingAttributes)

属性值

类型:Microsoft.Ink.DrawingAttributes
绘制墨迹时应用于该墨迹的 DrawingAttributes 对象。如果此对象为 nullnull 引用(在 Visual Basic 中为 Nothing)(在 Microsoft Visual Basic .NET 中为 Nothing),则 Stroke 使用墨迹收集器 对象的默认绘制属性。

备注

DrawingAttributes 属性指定墨迹的外观。例如,可以指定墨迹的宽度或颜色。

DrawingAttributes 属性 (Property) 的后续调用仅更改新笔画的绘制属性 (Attribute)。这些调用不会应用于已收集或正在收集的笔画。

备注

DefaultDrawingAttributes 属性 (Property)(InkCollector.DefaultDrawingAttributesInkOverlay.DefaultDrawingAttributesMicrosoft.Ink.InkPicture)包含所有 Stroke 对象使用的绘制属性 (Attribute),除非这些对象设置了自己的 DrawingAttributes 属性 (Property)。例如,未设置 DrawingAttributes 的新 Stroke 对象和其 DrawingAttributes 设置为 nullnull 引用(在 Visual Basic 中为 Nothing)(在 Visual Basic .NET 中为 Nothing)的旧 Stroke 对象都使用墨迹收集器的 DefaultDrawingAttributes 属性。

示例

此示例获取 InkOverlay 对象的第一个选定笔画的 DrawingAttributes 属性。

If mInkOverlay.Selection.Count > 0 Then
    Dim firstSelectedDA As DrawingAttributes = mInkOverlay.Selection(0).DrawingAttributes
End If
if (mInkOverlay.Selection.Count > 0)
{
    DrawingAttributes firstSelectedDA = mInkOverlay.Selection[0].DrawingAttributes;
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Stroke 类

Stroke 成员

Microsoft.Ink 命名空间

Stroke

DrawingAttributes

Cursor

Cursor.DrawingAttributes

InkCollector.DefaultDrawingAttributes

InkOverlay.DefaultDrawingAttributes

InkPicture.DefaultDrawingAttributes