Nevron .NET Vision Documentation
Standard Frame Style

The NStandardFrameStyle class defines rectangular frames. It can describe virtually any type of rectangular frame appearance, including the Windows controls frames. The standard frame consist of four elements: outer bevel, outer border, inner bevel and inner border. The following picture illustrates a frame with raised outer bevel and sunken inner bevel. The bevel distance is painted in blue and the border in red.

 

Bevel Style

Bevels edges can be either disabled, raised or sunken. The frame bevel edge styles are controlled via the InnerBevelStyle and OuterBevelStyle properties of the NStandardFrameStyle class.

C#
Copy Code
someFrame.OuterBevelStyle = FrameBevelStyle.Raised;
someFrame.InnerBevelStyle = FrameBevelStyle.Sunken;
Visual Basic
Copy Code
someFrame.OuterBevelStyle = FrameBevelStyle.Raised
someFrame.InnerBevelStyle = FrameBevelStyle.Sunken
Bevel Color

The inner bevel is rendered using the InnerBevelLightColor and InnerBevelDarkColor colors of the NStandardFrameStyle class. Initially these colors are set to KnownColor.Control and KnownColor.ControlDarkDark respectively.

The outer bevel is rendered using the OuterBevelLightColor and OuterBevelDarkColor colors of the NStandardFrameStyle class. Initially these colors are set to KnownColor.ControlLightLight and KnownColor.ControlDark respectively. The following example will modify the default settings for these colors:

C#
Copy Code
standardFrameStyle.InnerBevelLightColor = Color.LightSeaGreen;
standardFrameStyle.InnerBevelDarkColor = Color.DarkSeaGreen;
standardFrameStyle.OuterBevelLightColor = Color.LightBlue;
standardFrameStyle.OuterBevelDarkColor = Color.DarkBlue;
Visual Basic
Copy Code
standardFrameStyle.InnerBevelLightColor = Color.LightSeaGreen
standardFrameStyle.InnerBevelDarkColor = Color.DarkSeaGreen
standardFrameStyle.OuterBevelLightColor = Color.LightBlue
standardFrameStyle.OuterBevelDarkColor = Color.DarkBlue
Bevel Width

You can also control the width of the bevels by using the InnerBevelWidth and OuterBevelWidth properties controlling the widht of the inner and outer bevel respectively. The following examples show how to modify these widths:

C#
Copy Code
standardFrameStyle.InnerBevelWidth = new NLength(3, NGraphicsUnit.Point);
standardFrameStyle.OuterBevelWidth = new NLength(3, NGraphicsUnit.Point);
Visual Basic
Copy Code
standardFrameStyle.InnerBevelWidth = New NLength(3, NGraphicsUnit.Point)
standardFrameStyle.OuterBevelWidth = New NLength(3, NGraphicsUnit.Point)
Inner Border

You can control the appearance of the inner border through the InnerBorderColor and InnerBorderWidth properties. The following code will modify the inner border width and color:

C#
Copy Code
standardFrameStyle.InnerBorderColor = Color.Firebrick ;
standardFrameStyle.InnerBorderWidth = new NLength(3, NGraphicsUnit.Point);
Visual Basic
Copy Code
standardFrameStyle.InnerBorderColor = Color.Firebrick 
standardFrameStyle.InnerBorderWidth = New NLength(3, NGraphicsUnit.Point)
Outer Border

You can control the appearance of the outer border through the OuterBorderColor and OuterBorderWidth properties. The following code will modify the outer border width and color:

C#
Copy Code
standardFrameStyle.OuterBorderColor = Color.Firebrick ;
standardFrameStyle.OuterBorderWidth = new NLength(3, NGraphicsUnit.Point);
Visual Basic
Copy Code
standardFrameStyle.OuterBorderColor = Color.Firebrick 
standardFrameStyle.OuterBorderWidth = New NLength(3, NGraphicsUnit.Point)
See Also

 

 


©2017. Nevron Software LLC.

Send Feedback