CompositeDesignerTheme.WatermarkAlignment 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 CompositeActivityDesigner 中的水印图像的对齐方式。
public:
virtual property System::Workflow::ComponentModel::Design::DesignerContentAlignment WatermarkAlignment { System::Workflow::ComponentModel::Design::DesignerContentAlignment get(); void set(System::Workflow::ComponentModel::Design::DesignerContentAlignment value); };
public virtual System.Workflow.ComponentModel.Design.DesignerContentAlignment WatermarkAlignment { get; set; }
member this.WatermarkAlignment : System.Workflow.ComponentModel.Design.DesignerContentAlignment with get, set
Public Overridable Property WatermarkAlignment As DesignerContentAlignment
属性值
一个 DesignerContentAlignment 枚举值,该值指示在 CompositeActivityDesigner 中放置水印图像的位置。 默认值是 BottomRight。
示例
下面的示例演示如何通过从 CompositeDesignerTheme 类派生并为新主题设置适当的属性来创建自定义 CompositeDesignerTheme。
public class ParallelIfTheme : CompositeDesignerTheme
{
public ParallelIfTheme(WorkflowTheme theme)
: base(theme)
{
this.ShowDropShadow = true;
this.ConnectorStartCap = LineAnchor.None;
this.ConnectorEndCap = LineAnchor.None;
this.BorderStyle = DashStyle.Dash;
this.WatermarkImagePath = @"parallelIfWatermark.png";
this.WatermarkAlignment = DesignerContentAlignment.Fill;
}
}
Public Class ParallelIfTheme
Inherits CompositeDesignerTheme
Public Sub New(ByVal theme As WorkflowTheme)
MyBase.new(theme)
Me.ShowDropShadow = True
Me.ConnectorStartCap = LineAnchor.None
Me.ConnectorEndCap = LineAnchor.None
Me.BorderStyle = DashStyle.Dash
Me.WatermarkImagePath = "parallelIfWatermark.png"
Me.WatermarkAlignment = DesignerContentAlignment.Fill
End Sub
End Class
若要在 CompositeActivityDesigner 上使用主题,请将 ActivityDesignerThemeAttribute 应用于 CompositeActivityDesigner 类。
[ActivityDesignerTheme(typeof(ParallelIfTheme))]
public class ParallelIfDesigner : ParallelActivityDesigner
<ActivityDesignerTheme(GetType(ParallelIfTheme))> _
Public Class ParallelIfDesigner
Inherits ParallelActivityDesigner