Starting with version 13.1, I have made it easier to use the splash forms powered by the SplashScreenManager component from our XtraEditors library.
You can add a custom splash form into your WinForms executable project via the Add New Item… dialog and the new DevExpress v13.1 Template Gallery wizard (find there the XtraSplashScreen or XtraWaitForm items).
To tell XAF to use this custom splash form, configure your WinApplication descendant as follows:
C#FeatureCenterWindowsFormsApplication xafApplication = new FeatureCenterWindowsFormsApplication();
xafApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen(typeof(SplashScreen1));
Alternatively, you can display a static image as a splash. To do this, add a required image (say MySplashImage.png) into your executable project and set its BuildAction to EmbeddedResource. After that, you can use the following code:
C#FeatureCenterWindowsFormsApplication xafApplication = new FeatureCenterWindowsFormsApplication();
xafApplication.SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen("MySplashImage.png");
If a parameterless DXSplashScreen constructor is used, then the default wait form (DevExpress.ExpressApp.Win.Utils.DXSplashScreenForm) is displayed.
The DXSplashScreen class can also be used to display a splash image or provide a "live" splash notifying users about current progress.
Refer to the
"%Public%\Documents\DXperience 13.1 Demos\eXpressApp Framework\FeatureCenter\CS\FeatureCenter.Module.Win\Splash\SplashController.cs" file for more details on how this can be customized.
You can also localize the default splash messages:
- Localize the corresponding resource files as per the "Standard XAF Modules" section of the http://documentation.devexpress.com/#Xaf/CustomDocument3301 help article.
- In code by overriding the UpdateStatus method. This is demonstrated in the WinApplication.cs file of the FeatureCenter demo.
The latest approach is more flexible and the easiest one.
In the future it will be possible to localize the DevExpress.ExpressApp\Localization\ApplicationStatusMesssages.resx file or corresponding captions exported into the application model.
Check the following video to see how this works in action:
http://screencast.com/t/GgPz6VFT5W2
Thanks,
Dennis