Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Collapse]Forms and User Controls
    XtraForm
    Ribbon Form
    Tabbed Form
    XtraUserControl
    Form Assistant
    Taskbar Assistant
   [Expand]Splash Screen Manager
   [Expand]Adorner UI Manager
   [Expand]Examples
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

XtraForm

DevExpress skins and Look And Feel techniques can only be applied to DevExpress controls. To implement a consistent UI throughout your applications, standard WinForms dialogs, forms and message boxes have to be replaced with their DevExpress counterparts. This article is dedicated to XtraForms that replace default project forms.

Expanded Add XtraForms to the Project

The fastest way to start a project with an XtraForm as your main form is to utilize UI-ready DevExpress templates. All these templates are based on DevExpress forms. Specifically, toolbar-based templates and the "Blank Application" template utilize XtraForms.

To add new XtraForms, right-click your project in Visual Studio's Solution Explorer window and select "Add DevExpress Item | New Item...". This will invoke the Template Gallery with new item templates. Select the "Form" template, enter the form name and click "Add Item".

Expanded Convert Standard Forms to XtraForms

To replace existing default forms with XtraForms, invoke form smart-tags and select the "Convert to Skinable Form" option.

To do the same in code, simply change the base class from which your form derives from System.Windows.Forms.Form to DevExpress.XtraEditors.XtraForm. You will also need to include the DevExpress.XtraEditors library in your project.

Expanded Apply Skins to the Form Title Bar

If you utilize the DefaultLookAndFeel component to skin your application, all code lines required will be automatically added to the Main() method of your Project.cs file. In this case, you do nothing, the form title bar (and all controls lying on this form) will be painted according to the active skin.

Otherwise, if you apply skins in code, call the static SkinManager.EnableFormSkins and/or SkinManager.EnableMdiFormSkins methods manually.

Expanded Glow and Shadow Effects

The XtraForm.FormBorderEffect property allows you to activate glow or shadow effects for your form.

Set the property to FormBorderEffect.Shadow to enable the form shadow. In order to make the form shadow lighter or darker, assign byte values ranging from 0 to 255 to the FormShadow.Opacity property .

The Form glow effect is activated when you set the XtraForm.FormBorderEffect property to FormBorderEffect.Glow. This setting applies a soft shine to the form's borders. A form can glow with two colors depending on whether or not it is currently active (selected). These colors are assigned to the XtraForm.ActiveGlowColor and XtraForm.InactiveGlowColor properties.

Expanded MDI Title Bar Captions

If the XtraForm.ShowMdiChildCaptionInParentTitle option is enabled, child MDI form captions are merged with the parent form's title bar. The figure below illustrates an example: the "document1" string is displayed next to the parent form's own "Form1" caption.

To change the default "<child_form_caption> - <parent_form_caption>" format string, utilize the XtraForm.MdiChildCaptionFormatString property.

How would you rate this topic?​​​​​​​