User Interface for .NET / User's Guide / Custom Forms / Predefined Frames

Predefined Frames

Following are the predefined frames that ship with our UI library:

 Simple

The renderer uses only gradients and solid colors based on the current palette to paint the non-client area. High speed performance.

 Vista Slate

The renderer uses a set of segmented images to paint caption, frames and caption buttons. This template fits best with the new color scheme Office 2007. 

 Vista Royal

The renderer uses a set of segmented images to paint caption, frames and caption buttons. This template fits best with the Longhorn color scheme.

 Opus Alpha

A modern light-weight appearance based on segmented images. Ideal for both great look and high speed performance.

 Inspirat

Smooth appearance based on shades of the light blue color. Fits best with LunaBlue color scheme.

 Applying Predefined Frame

You may specify a predefined frame template either globally or locally.

 

The following example demonstrates how to obtain a predefined frame instance: 

C#
Copy Code
NFrameAppearance predefinedFrame =
NUIManager.GetPredefinedFrame(PredefinedFrame.OpusAlpha);
Visual Basic
Copy Code
Dim predefinedFrame As NFrameAppearance =
NUIManager.GetPredefinedFrame(PredefinedFrame.OpusAlpha)

You may set a predefined frame as global directly: 

C#
Copy Code
NUIManager.SetPredefinedFrame(PredefinedFrame.Inspirat);
Visual Basic
Copy Code
NUIManager.SetPredefinedFrame(PredefinedFrame.Inspirat)
 Applying Custom Frame

The following code demonstrates how to apply a custom frame globally: 

C#
Copy Code
NUIManager.FrameAppearance = myCustomAppearance;
Visual Basic
Copy Code
NUIManager.FrameAppearance = myCustomAppearance

Applying the template per NForm instance: 

C#
Copy Code
myForm.FrameAppearance = myCustomAppearance;
Visual Basic
Copy Code
myForm.FrameAppearance = myCustomAppearance
See Also