Xceed Chart for WinForms v4.4 Documentation
Background Frame

Welcome to Xceed Chart for WinForms v4.4 > User Guide > Lines and Frames > Background Frame

Xceed Chart for WinForms supports two different types of background frames, with which you can produce either an XP or standard Windows look for your charts. The object controlling the background frame is called Background

The type of the background frame is controlled by the FrameType property of the Background object, accepting values from the FrameType enumeration.

Standard (Windows-like) Background Frames

You'll typically use this type of frame when you build Windows Forms applications where the control must be embedded in the visual interface. When you want to use a standard background frame, you must set the FrameType property to FrameType.Standard:

VB.NET  
background.FrameType = FrameType.Standard

C#  
background.FrameType = FrameType.Standard;

The properties of the standard background frame are controlled by a StandardFrame object, which can be accessed through the StandardFrame property of the Background object. For example, to produce a sunken frame you must use the following code:

VB.NET  

Dim frame As StandardFrame = background.StandardFrame
frame.OuterStyle = FrameBevelStyle.Sunken
frame.InnerStyle = FrameBevelStyle.Sunken
frame.BevelWidth = 2
C#  

StandardFrame frame = background.StandardFrame;
frame.OuterStyle = FrameBevelStyle.Sunken;
frame.InnerStyle = FrameBevelStyle.Sunken;
frame.BevelWidth = 2;

The StandardFrame object is discussed in detail in the Standard Frames topic.

Image Frame Background Frame

A more interesting type of background frame is the artistic or image border frame supported by Xceed Chart for WinForms. This type of frame can be very useful for Web or Windows XP-style applications and can significantly enhance the quality of the chart's presentation. To switch the frame type to Image, you must use the following code:

VB.NET  
background.FrameType = FrameType.Image

C#  
background.FrameType = FrameType.Image;

The properties of the image background frame are controlled by an ImageFrame object, which can be accessed through the ImageFrame property of the Background object. The following code sets a predefined image frame for the background:

The image frame type is controlled by the Type property:

VB.NET  

Dim frame As ImageFrame = background.ImageFrame
frame.SetPredefinedFrameStyle(PredefinedImageFrame.Common)
C#  

ImageFrame frame = background.ImageFrame;
frame.SetPredefinedFrameStyle(PredefinedImageFrame.Common);

The ImageFrame object is discussed in detail in the Image Frames topic. 

Finally, let's look at a few images of a chart with applied background frames (using the Type property):

 

Standard Raised Sunken Standard Raised
Image border Common Image border Colonial

Related Examples

Windows Forms: Background frame\General

See also

Background