ActivityDesigner.OnLayoutSize(ActivityDesignerLayoutEventArgs) ActivityDesigner.OnLayoutSize(ActivityDesignerLayoutEventArgs) ActivityDesigner.OnLayoutSize(ActivityDesignerLayoutEventArgs) ActivityDesigner.OnLayoutSize(ActivityDesignerLayoutEventArgs) Method

定義

傳回 ActivityDesigner 上的視覺提示或子活動設計工具的大小。Returns the size of the visual cues or child activity designers on the ActivityDesigner.

protected:
 virtual System::Drawing::Size OnLayoutSize(System::Workflow::ComponentModel::Design::ActivityDesignerLayoutEventArgs ^ e);
protected virtual System.Drawing.Size OnLayoutSize (System.Workflow.ComponentModel.Design.ActivityDesignerLayoutEventArgs e);
abstract member OnLayoutSize : System.Workflow.ComponentModel.Design.ActivityDesignerLayoutEventArgs -> System.Drawing.Size
override this.OnLayoutSize : System.Workflow.ComponentModel.Design.ActivityDesignerLayoutEventArgs -> System.Drawing.Size
Protected Overridable Function OnLayoutSize (e As ActivityDesignerLayoutEventArgs) As Size

參數

傳回

視覺提示或子活動設計工具的新大小設定。The new size settings for the visual cues or child activity designers.

例外狀況

e 包含 null 參考 (在 Visual Basic 中為 Nothing)。e contains a null reference (Nothing in Visual Basic).

範例

以下範例將說明如何覆寫 OnLayoutSize 方法。The following example shows how to override the OnLayoutSize method. 在這個範例中,Activity 的大小保持不變,其高度和寬度都是 64。For this example, the size of the Activity remains static with a height and width of 64.

readonly static Size BaseSize = new Size(64, 64);
protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
{
    return BaseSize;
}
Shared ReadOnly BaseSize As New Size(64, 64)
Protected Overrides Function OnLayoutSize(ByVal e As ActivityDesignerLayoutEventArgs) As Size
    Return BaseSize
End Function

適用於