Back to Devexpress

ISplash.SetDisplayText(String) Method

expressappframework-devexpress-dot-expressapp-dot-win-dot-isplash-dot-setdisplaytext-x28-system-dot-string-x29.md

latest2.5 KB
Original Source

ISplash.SetDisplayText(String) Method

Sets the text to be displayed by the label located on the default splash screen form.

Namespace : DevExpress.ExpressApp.Win

Assembly : DevExpress.ExpressApp.Win.v25.2.dll

NuGet Packages : DevExpress.ExpressApp.Win, DevExpress.ExpressApp.Win.Design

Declaration

csharp
void SetDisplayText(
    string displayText
)
vb
Sub SetDisplayText(
    displayText As String
)

Parameters

NameTypeDescription
displayTextString

A string value representing the text to be shown on the default splash screen form.

|

Remarks

The splash screen form shown by a Windows Forms XAF application, by default, contains a label. This label has the “Loading…” text assigned. You can set another text by using the SetDisplayText method of the object returned by the application’s SplashScreen property.

csharp
static class Program {
    static void Main() {
        //..
        MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
        try {
            application.SplashScreen.SetDisplayText("MyText");
            application.Setup();
            application.Start();
        }
        //...
    }
}

The SetDisplayText method must be called before the Setup method call. Otherwise, the splash screen with the default text will be shown.

When implementing a custom splash screen, you do not have to implement the SetDisplayText method:

csharp
public class MySplash : ISplash {
    //...
    public void SetDisplayText(string displayText) {}
}

If your splash screen form contains a label, you can set the required text to it explicitely, without additional code.

See Also

ISplash Interface

ISplash Members

DevExpress.ExpressApp.Win Namespace