共用方式為


WorkflowView.FitToScreenSize 方法

定義

變更工作流程設計介面的縮放層級,以在 WorkflowView 中顯示整個工作流程。

public:
 void FitToScreenSize();
public void FitToScreenSize ();
member this.FitToScreenSize : unit -> unit
Public Sub FitToScreenSize ()

範例

下列範例將示範如何啟用 [調整成螢幕大小] 按鈕。 此方法首先取得設計工具的 介面,然後在修改 屬性前使用 方法取得 物件。 最後,呼叫 方法以在 的可顯示區域界限內顯示完整的工作流程。

public void EnableFitToScreen()
{
    IDesignerHost designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
    WorkflowView workflowView =
        designerHost.RootComponent.Site.GetService(typeof(WorkflowView)) as WorkflowView;

    if (workflowView != null)
    {
        workflowView.EnableFitToScreen = true;
        workflowView.FitToScreenSize();
    }
}
Public Sub EnableFitToScreen()

    Dim designerHost As IDesignerHost = CType(GetService(GetType(IDesignerHost)), IDesignerHost)
    Dim workflowView As WorkflowView = _
        CType(designerHost.RootComponent.Site.GetService(GetType(WorkflowView)), WorkflowView)

    If workflowView IsNot Nothing Then
        workflowView.EnableFitToScreen = True
        workflowView.FitToScreenSize()
    End If
End Sub

備註

實際縮放層級與使用者工作流程設計工具的設定有關。

適用於

另請參閱