Nevron .NET Vision
Framework / Presentation Layer / Graphics / Appearance Styles / Backplane Style

In This Topic
    Backplane Style
    In This Topic

    Backplanes are filled shapes that are displayed behind texts to increase text readability. Backplanes are represented by the NBackplaneStyle object. The following sections show how to work with backplanes.

     Visibilty

    To make a backplane visible you have to set the Visible property to true:

    C#
    Copy Code
    textStyle.BackplaneStyle.Visible = true;
    
    Visual Basic
    Copy Code
    textStyle.BackplaneStyle.Visible = True
    
     Dimensions

    The size of a backplane is determined by the object it is attached to. For example if a backplane is displayed behind a text its size depends on the text size. You can additionally inflate or deflate this size with the Inflate property of the NBackplaneStyle object. The following example creates a text style object and increases the backplane size:

    Visual Basic
    Copy Code
    Dim textStyle As NTextStyle = New NTextStyle()
    textStyle.BackplaneStyle.Inflate = New NSizeL(10, 10) 'inflate by 10 points
    
    C#
    Copy Code
    NTextStyle textStyle = new NTextStyle();
    textStyle.BackplaneStyle.Inflate = new NSizeL(10, 10); // inflate by 10 points
    
     Shape

    The shape of a backplane is controlled through the Shape property. It accepts values from the BackplaneShape enumeration. Use the following code to change the backplane shape:

    Visual Basic
    Copy Code
    backplane.Shape = BackplaneShape.Ellipse
    
    C#
    Copy Code
    backplane.Shape = BackplaneShape.Ellipse;
    

    The supported backplane shapes are Rectangle, Circle, Ellipse, Cut Edge Rectangle and Smooth Edge Rectangle. In the case of Cut Edge Rectangle and Smooth Edge Rectangle you can specify the edge size in percent of the smaller backplane dimension (width or height). The size is specified with the EdgePercent property. Its default value is 20% and it can vary in the range [0, 50]:

    Visual Basic
    Copy Code
    backplane.Shape = BackplaneShape.CutEdgeRectangle
    backplane.EdgePercent = 30 ' increase the cut edge size
    
    C#
    Copy Code
    backplane.Shape = BackplaneShape.CutEdgeRectangle;
    backplane.EdgePercent = 30; // increase the cut edge size
    
     Frame and Border

    The backplane has an attached NStandardFrameStyle object controlling the frame properties. When the backplane is not horizontal or vertical the frame properties are discarded and only a simple border can be displayed. The following table shows two labels with equal frame properties but different orientation:

    Label with raised frame and border.
    Horizontal orientation.
    Label with raised frame and border.
    Rotated 45 degrees.

    See Also