Windows Forms Form (SfForm) Overview

24 May 20232 minutes to read

The SfForm is a window control for completing customization of the appearance and loading of custom user interface in the Title bar.

Key Features

Following are the key features of the SfForm:

  • Title bar customization : Customizes the appearance of the title bar and load the user control as a title bar.

  • MDI(Multiple Document Interface) customization : Adds MDI child forms and customizes the appearance of MDI child forms.

Choose between different form controls

Syncfusion WinForms suite comes up with the following different forms:

SfForm

The SfForm window control allows you to completely customize its appearance. Support to load an user interface in the title bar: add an MDI child form and allows the appearance of child forms to be customized.

MetroForm

MetroForm is used to create customizable window for the end user’s application. It supports various built-in skins and let the user to control its behavior and appearance.

Office2007Form

Office2007Form is an advanced standard form that offers Microsoft Office2007 like, UI and appearance. It supports various built-in color schemes and customization options to control its behavior and appearance.

SfForm vs MetroForm

Both SfForm and MetroForm controls are used for the same purpose. But, the SfForm control offers rich set of features over MetroForm. For caption images and label, use MetroForm. For custom user control in TitleBar and customizing the appearance of form and MDI forms, use SfForm.

The list of some specific API differences between SfForm and MetroForm are as follows.

SfForm

MetroForm

Description

Style.Border BorderColor Changes the color of the border.
Style.TitleBar.Height CaptionBarHeight Increases the title or caption bar height.
Style.TitleBar.TextHorizontalAlignment CaptionAlign Displays the text on the title or caption bar that can be aligned horizontally.
Style.TitleBar.TextVerticalAlignment CaptionVerticalAlignment Displays the text on the title or caption bar that can be aligned vertically.
Style.TitleBar.IconVerticalAlignment Style.TitleBar.IconHorizontalAlignment IconAlign Displays the icon that can be aligned horizontally or vertically.

The list of features in SfForm over MetroForm are as follows.

Feature

Description

Loading UserControl to TitleBar Loads any user control in the title bar instead of text by using the

TitleBarTextControl

property. Size of the user control should be set properly to fit the control within the title bar. To learn more about loading user control to TitleBar in SfForm, refer to

here

.
Border customization Sets the active and inactive border colors by using the

Style.Border

and

Style.InActiveBorder

properties. To learn more about border customization in SfForm, refer to

here

.
Rich text formatting Displays the rich text inside the title bar by enabling the

AllowRichText

property. To learn more about rich text formatting in SfForm, refer to

here

.