Επεξεργασία

Κοινή χρήση μέσω


WorkflowView.EnableFitToScreen Property

Definition

Enables the button on the design surface that, when clicked, changes the zoom level of the workflow design surface so that the entire workflow is displayed in the WorkflowView.

public:
 property bool EnableFitToScreen { bool get(); void set(bool value); };
public bool EnableFitToScreen { get; set; }
member this.EnableFitToScreen : bool with get, set
Public Property EnableFitToScreen As Boolean

Property Value

true if the dynamic button is enabled; otherwise, false.

Examples

The following example shows how to enable the fit to screen button. The method first obtains the IDesignerHost interface for the designer and then retrieves the WorkflowView object by using the GetService method before modifying the EnableFitToScreen property.

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

Applies to