windowsforms-devexpress-dot-xtraeditors-dot-xtraform-035326bc.md
Gets or sets how to display application forms.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static FormShowMode DefaultFormShowMode { get; set; }
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Advanced)>
Public Shared Property DefaultFormShowMode As FormShowMode
| Type | Description |
|---|---|
| FormShowMode |
Specifies how to display application forms.
|
Available values:
| Name | Description |
|---|---|
| Default |
Displays application forms immediately.
| | AfterInitialization |
Displays application forms only after their initialization.
|
The DefaultFormShowMode property allows you to visually hide the form initialization process (in some cases, drawing controls may cause flickering). Set this property to AfterInitialization to initially display application forms with 0 opacity and return the opacity to 1 only after the form is completely initialized.
internal static class Program {
[STAThread]
static void Main() {
// ...
XtraForm.DefaultFormShowMode = FormShowMode.AfterInitialization;
}
}
Friend Module Program
<STAThread>
Private Sub Main()
' ...
XtraForm.DefaultFormShowMode = FormShowMode.AfterInitialization
End Sub
End Module
Alternatively, you can override the ShowMode property for a specific form:
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
protected override FormShowMode ShowMode => FormShowMode.AfterInitialization;
// ...
}
Public Partial Class Form1
Inherits DevExpress.XtraEditors.XtraForm
Protected Overrides ReadOnly Property ShowMode As FormShowMode
Get
Return FormShowMode.AfterInitialization
End Get
End Property
' ...
End Class
See Also