IWxStyle.BackgroundBrushBackColor

Fore Syntax

BackgroundBrushBackColor: IGxColor;

Fore.NET Syntax

BackgroundBrushBackColor: Prognoz.Platform.Interop.DrawingGxColor;

Description

The BackgroundBrushBackColor property determines pattern color for object background.

Fore Example

Executing the example requires a form with the Button and UiWorkspaceObject components with the Button1 and UiWorkspaceObject1 identifiers, respectively. A corresponding repository object must be connected to UiWorkspaceObject. This component must also contain a previously created shape.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
Begin
    ws := UiWorkspaceObject1.Instance As IWxWorkspace;
    ws.BeginUpdate;
    Shape := ws.Shapes.Item(1);
    Style := Shape.Style;
    Style.BackgroundBrushForeColor := GxColor.FromName("Red");
    Style.BackgroundBrushForeTransparent := 30;
    Style.BackgroundBrushBackColor := GxColor.FromName("Blue");
    Style.BackgroundBrushBackTransparent := 60;
    Style.BackgroundBrushPattern := GxBrushPattern.Diagonals;
    ws.EndUpdate;
End Sub Button1OnClick;

After executing the example the color fill with defined settings is set on clicking the Button1 component located on the shape of the UiWorkspaceObject1 component.

Fore.NET Example

Executing the example requires a form with the Button and UiWorkspaceObjectNet components with the Button1 and UiWorkspaceObjectNet1 identifiers, respectively. A corresponding repository object must be connected to UiWorkspaceObjectNet. This component must also contain a previously created shape.

Imports System;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Workspace;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.ExtCtrls;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: WxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
    SColor: GxColorClassClass = New GxColorClassClass();
Begin
    ws := uiWorkspaceObjectNet1.WorkspaceObjectUi.Instance As WxWorkspace;
    ws.BeginUpdate();
    Shape := ws.Shapes.Item[1];
    Style := Shape.Style;
    Style.BackgroundBrushBackColor := SColor.FromName("Red");
    Style.BackgroundBrushForeTransparent := 30;
    Style.BackgroundBrushBackColor := SColor.FromName("Blue");
    Style.BackgroundBrushBackTransparent := 60;
    Style.BackgroundBrushPattern := GxBrushPattern.wbpDiagonals;
    ws.EndUpdate();
End Sub;

After executing the example the color fill with defined settings is set on clicking the Button1 component located on the shape of the UiWorkspaceObjectNet1 component.

See also:

IWxStyle