Edit this page

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

forms-and-dialogs-form-using-the-formimageborderprimitive 001

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:

forms-and-dialogs-form-using-the-formimageborderprimitive 002

Figure 2: LeftTexture

forms-and-dialogs-form-using-the-formimageborderprimitive 003

After setting the BottomTexture property with the following image:

forms-and-dialogs-form-using-the-formimageborderprimitive 004

Figure 3: BottomTexture

forms-and-dialogs-form-using-the-formimageborderprimitive 005

The RightTexture property with the following image:

forms-and-dialogs-form-using-the-formimageborderprimitive 006

Figure 4: RightTexture

forms-and-dialogs-form-using-the-formimageborderprimitive 007

The BottomLeftCorner and BottomRightCorner properties with the corresponding images:

forms-and-dialogs-form-using-the-formimageborderprimitive 008

forms-and-dialogs-form-using-the-formimageborderprimitive 010

Figure 5: BottomLeftCorner and BottomRightCorner

forms-and-dialogs-form-using-the-formimageborderprimitive 009

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