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

In This Topic
    Background Style
    In This Topic

    The background style is represented by an instance of the NBackgroundStyle class. It is used to define the background of controls, documents and other objects. The background style is composed from a NFillStyle and NFrameStyle objects. The NFillStyle object of the background style controls the filling of the background. The following code will apply a dark blue filling on on the background:

    C#
    Copy Code
    someObject.BackgroundStyle.FillStyle = new NColorFillStyle(Color.DarkBlue);
    
    Visual Basic
    Copy Code
    someObject.BackgroundStyle.FillStyle = new NColorFillStyle((Color.DarkBlue)
    

    The following code will apply an image frame with applied gradient to the background:

    C#
    Copy Code
    NImageFrameStyle imageFrameStyle = new NImageFrameStyle();
    imageFrameStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.White, Color.DarkBlue);
    someObject.BackgroundStyle.FrameStyle = imageFrameStyle;
    
    Visual Basic
    Copy Code
    Dim imageFrameStyle as New NImageFrameStyle()
    imageFrameStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.White, Color.DarkBlue)
    someObject.BackgroundStyle.FrameStyle = imageFrameStyle
    
    See Also