Windows Forms Form (SfForm) Overview
8 Jul 20262 minutes to read
The SfForm is a window control for completely customizing the appearance of a form and loading a custom user interface in the title bar.
Key Features
The key features of the SfForm are as follows:
-
Title bar customization: Customizes the appearance of the title bar and loads a user control into the 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. It supports loading a custom user interface in the title bar, adding MDI child forms, and customizing the appearance of child forms.
MetroForm
MetroForm is used to create a customizable window for the end user’s application. It supports various built-in skins and lets the user control its behavior and appearance.
Office2007Form
Office2007Form is an advanced standard form that offers a 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. However, the SfForm control offers a rich set of features over MetroForm. For caption images and labels, use MetroForm. For custom user controls in the title bar and customizing the appearance of the 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 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 . |
| Border customization | Sets the active and inactive border colors by using the and properties. To learn more about border customization in SfForm, refer to . |
| Rich text formatting | Displays the rich text inside the title bar by enabling the property. To learn more about rich text formatting in SfForm, refer to . |