文檔首頁>>DevExpress WinForm中文手冊>>皮膚啟動界面
皮膚啟動界面
具有皮膚感知功能的啟動界面。
- 顏色和字體設置取決于皮膚。
- 您可以自定義并在代碼中顯示此啟動界面。
顯示并關閉啟動界面
您可以使用靜態(tài)SplashScreenManager.ShowSkinSplashScreen方法手動創(chuàng)建并顯示皮膚啟動界面(例如可以在應用程序啟動時調用它),該方法的參數允許您指定預定義區(qū)域、界面位置、淡入淡出動畫效果等的內容,下圖演示了您可以自定義的啟動界面區(qū)域。
要關閉啟動界面,請使用靜態(tài)SplashScreenManager.CloseForm方法。
C#:
using DevExpress.XtraSplashScreen; // Logo image. Image myLogoImage = Resources.Logo; // Show a splashscreen. SplashScreenManager.ShowSkinSplashScreen( logoImage: myLogoImage, title: "When Only The Best Will Do", subtitle: "DevExpress WinForms Controls", footer: "Copyright © 2000 - 2020 Developer Express Inc." + Environment.NewLine + "All Rights reserved.", loading: "Starting...", parentForm: this ); //Do an operation //... //Close the splashscreen DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm()
VB.NET :
Imports DevExpress.XtraSplashScreen ' Logo image. Dim myLogoImage As Image = My.Resources.Logo ' Show a splashscreen. DevExpress.XtraSplashScreen.SplashScreenManager.ShowSkinSplashScreen( logoImage:=myLogoImage, title:="When Only The Best Will Do", subtitle:="DevExpress WinForms Controls", footer:="Copyright © 2000 - 2020 Developer Express Inc." & Environment.NewLine & "All Rights reserved.", loading:="Starting...", parentForm:=Me ) 'Do an operation '... 'Close the splashscreen DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm()
動態(tài)更新啟動界面
啟動界面顯示在單獨的線程中,您可以使用通過SplashScreenManager.SendCommand方法發(fā)送的命令動態(tài)更新當前啟動界面的內容。
C#:
SplashScreenManager.Default.SendCommand(SkinSplashScreenCommand.UpdateLoadingText, "Done");
VB.NET:
SplashScreenManager.Default.SendCommand(SkinSplashScreenCommand.UpdateLoadingText, "Done")
DevExpress.XtraSplashScreen.SkinSplashScreenCommand類型枚舉支持的命令。
C#:
public enum SkinSplashScreenCommand { UpdateTitle, UpdateSubtitle, UpdateFooter, UpdateLoadingText, UpdateLogoImage, UpdateSvgImageSize }
VB.NET:
Public Enum SkinSplashScreenCommand UpdateTitle = 0 UpdateSubtitle = 1 UpdateFooter = 2 UpdateLoadingText = 3 UpdateLogoImage = 4 UpdateSvgImageSize = 5 End Enum