New to Telerik UI for WinForms? Download free 30-day trial

Using the FormImageBorderPrimitive

The FormImageBorderPrimitive allows you to customize the appearance of your RadForm by creating custom borders built of images. In this way you can easily create stylish visual effects and professional look-and-feel for your RadForm control.

The following topic describes how the FormImageBorderPrimitive works and demonstrates how to create a form with image borders.

Utilizing the FormImageBorderPrimitive

The FormImageBorderPrimitive exposes the following properties which are used to define the separate images which build the border:

  • TopLeftEnd

  • LeftTexture

  • BottomLeftCorner

  • BottomTexture

  • BottomRightCorner

  • RightTexture

  • TopRightEnd

The following picture shows the positions at which the images appear:

Figure 1: Image Positions

WinForms RadForm Image Positions

The LeftTexture, BottomTexture and RightTexture are drawn as textures between the TopLeftEnd and BottomLeftCorner, BottomLeftCorner and BottomRightCorner, BottomRightCorner and TopRightEnd respectively. The TopLeftEnd and the TopRightEnd images are used to define a smooth transition between the image border and the RadFormTitleBarElement. The BottomLeftCorner and BottomRightCorner properties are used to set the images which are drawn in the corners of the form's border.

It is important to know that setting one of the following properties does not cause any parts of the FormImageBorderPrimitive to be drawn:

  • TopLeftEnd

  • BottomRightCorner

  • BottomLeftCorner

  • TopRightEnd

The minimum requirement for parts of the border to be drawn is setting one of the following properties:

  • LeftTexture

  • BottomTexture

  • RightTexture

Here is how the RadForm control looks when the LeftTexture property is set with the following image:

WinForms RadForm Left Texture Visual

Figure 2: LeftTexture

WinForms RadForm LeftTexture

After setting the BottomTexture property with the following image:

WinForms RadForm Bottom Texture Visual

Figure 3: BottomTexture

WinForms RadForm BottomTexture

The RightTexture property with the following image:

WinForms RadForm Right Texture Visual

Figure 4: RightTexture

WinForms RadForm RightTexture

The BottomLeftCorner and BottomRightCorner properties with the corresponding images:

WinForms RadForm Bottom Left Corner Visual

WinForms RadForm Bottom Right Corner Visual

Figure 5: BottomLeftCorner and BottomRightCorner

WinForms RadForm BottomLeftCorner and BottomRightCorner

The parts used to build the Image Border of the form are scaled for the purpose of the topic.

The TopLeftEnd and TopRightEnd images are not obligatory as well as the BottomLeftCorner and BottomRightCorner images. However, they are needed for creating a more complete image border design for your RadForm control. You can set images for the FormImageBorderPrimitive in the Visual Style Builder as a part of a theme for the RadForm control.

See Also

In this article