DynamicRenderer.DrawingAttributes 属性
获取或设置 DynamicRenderer 对象使用的 DrawingAttributes 对象。
命名空间: Microsoft.StylusInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Property DrawingAttributes As DrawingAttributes
用法
Dim instance As DynamicRenderer
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
DynamicRenderer 对象所使用的 DrawingAttributes 对象。
备注
如果在用户绘制笔画时更改了此属性 (Property),则新的绘制属性 (Attribute) 不会应用到当前笔画,而是在绘制下一个笔画时生效。例如,在 IStylusAsyncPlugin 实现的 StylusDown 方法中设置此属性不会影响正在创建过程中的笔画。
当发生 DisplaySettingsChanged 事件时,将在 DisplaySettingsChanged 事件处理程序中重新计算 DrawingAttributes 对象的 Width 和 Height 属性。这对说明 DisplaySettingsChanged 事件所导致的可能的每英寸点数 (dpi) 更改是必要的。
以下是绘制属性的默认值:
绘制属性 |
值 |
---|---|
true |
|
Color.Black |
|
false |
|
1 |
|
false |
|
Ball |
|
0 |
|
53 |
示例
此 C# 示例通过使用 DynamicRenderer 对象 theDynamicRenderer,将动态呈现的笔画的颜色设置为红色。
theDynamicRenderer.DrawingAttributes.Color = Color.Red;
此 Visual Basic .NET 示例通过使用 DynamicRenderer 对象 theDynamicRenderer,将动态呈现的笔画的颜色设置为红色。
theDynamicRenderer.DrawingAttributes.Color = Color.Red
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0