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
|
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
|
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)
|
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)
|
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)
|