ShowStyleDialog Command

Purpose

Opens a standard dialog box that is used to set up format of workspace objects.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in the property:

Value type Description
IWxView Workspace display options, within which an object (objects) is selected and format setup dialog box is opened for it.

Application Features

The command can be used only for a workspace.

Fore Example

Executing the example requires a form with the Button1 button on it, the WorkspaceBox component named WorkspaceBox1, and the UiWorkspaceObject component that is a data source for WorkspaceBox1. A workspace is connected to UiWorkspaceObject, the Active property is set to True. Add a link to the Ui system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    Target := WinApplication.Instance.GetPluginTarget("Wsp");
    Context := Target.CreateExecutionContext;
    Context.Data := WorkspaceBox1.View;
    Target.Execute("ShowStyleDialog", Context);
End Sub Button1OnClick;

Selecting a workspace object (objects) and clicking the button opens the dialog box that is used to set up object format.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    WinApp: WinApplication = New WinApplicationClass_2();
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    Target := WinApp.GetPluginTarget("Wsp");
    Context := Target.CreateExecutionContext();
    Context.Data := WorkspaceBoxNet1.View;
    Target.Execute("ShowStyleDialog", Context, Null);
End Sub;

See also:

IUiCommandTarget.Execute