SequentialWorkflowHeaderFooter.ImageRectangle 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与页眉或页脚关联的图像的边框。
public:
virtual property System::Drawing::Rectangle ImageRectangle { System::Drawing::Rectangle get(); };
public virtual System.Drawing.Rectangle ImageRectangle { get; }
member this.ImageRectangle : System.Drawing.Rectangle
Public Overridable ReadOnly Property ImageRectangle As Rectangle
属性值
Rectangle,用于为与 Image 关联的 SequentialWorkflowHeaderFooter 定义边界。
示例
下面的示例演示如何重写 ImageRectangle 属性。 在本示例中,使用 ImageRectangle 的 Bounds 来计算 SequentialWorkflowHeaderFooter,以便在页眉/页脚的左上角绘制图像。
protected override Rectangle ImageRectangle
{
get
{
Rectangle bounds = this.Bounds;
Size sz = new Size(24, 24);
Rectangle imageRect = new Rectangle();
imageRect.X = bounds.Left + ((bounds.Width - sz.Width) / 2);
imageRect.Y = bounds.Top + 4;
imageRect.Size = sz;
return imageRect;
}
}
Protected Overrides ReadOnly Property ImageRectangle() As Rectangle
Get
Dim Bounds As Rectangle = Me.Bounds
Dim sz As New Size(24, 24)
Dim imageRect As New Rectangle()
imageRect.X = Bounds.Left + ((Bounds.Width - sz.Width) / 2)
imageRect.Y = Bounds.Top + 4
imageRect.Size = sz
Return imageRect
End Get
End Property