文檔金喜正規買球>>DevExpress WinForm中文手冊>>流暢啟動界面
流暢啟動界面
受Windows 10啟發的啟動界面。

- 具有Acrylic material effect — a partially 透明的紋理,僅當應用程序在Windows 10 Version 1803 (OS build 17134)或更高版本下運行時,此效果才可用。
- 您可以自定義并在代碼中顯示此啟動界面。
顯示并關閉啟動界面
您可以使用靜態SplashScreenManager.ShowFluentSplashScreen方法手動創建并顯示流暢的啟動界面(例如,可以在應用程序啟動時調用它),該方法的參數允許指定預定義區域、界面位置、淡入淡出動畫效果等的內容,下圖演示了可以自定義的啟動界面區域。

要關閉啟動界面,請使用靜態SplashScreenManager.CloseForm方法。
C#:
using DevExpress.XtraSplashScreen; // Show a splashscreen. FluentSplashScreenOptions op = new FluentSplashScreenOptions(); op.Title = "When Only The Best Will Do"; op.Subtitle = "DevExpress WinForms Controls"; op.RightFooter = "Starting..."; op.LeftFooter = "Copyright © 2000 - 2020 Developer Express Inc." + Environment.NewLine + "All Rights reserved."; op.LoadingIndicatorType = FluentLoadingIndicatorType.Dots; op.OpacityColor = Color.Gray; op.Opacity = 130; op.LogoImageOptions.SvgImage = Resources.Logo; DevExpress.XtraSplashScreen.SplashScreenManager.ShowFluentSplashScreen( op, parentForm: this, useFadeIn: true, useFadeOut: true ); //Do an operation //... //Close the splashscreen DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
VB.NET :
' Show a splashscreen. Dim op As FluentSplashScreenOptions = New FluentSplashScreenOptions() op.Title = "When Only The Best Will Do" op.Subtitle = "DevExpress WinForms Controls" op.RightFooter = "Starting..." op.LeftFooter = "Copyright © 2000 - 2020 Developer Express Inc." & Environment.NewLine & "All Rights reserved." op.LoadingIndicatorType = FluentLoadingIndicatorType.Dots op.OpacityColor = Color.Gray op.Opacity = 130 op.LogoImageOptions.SvgImage = My.Resources.Logo DevExpress.XtraSplashScreen.SplashScreenManager.ShowFluentSplashScreen(op, parentForm:=Me, useFadeIn:=True, useFadeOut:=True) 'Do an operation '... 'Close the splashscreen DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm()
動態更新啟動界面
啟動界面顯示在單獨的線程中,您可以使用SplashScreenManager.SendCommand 方法發送的命令動態更新當前啟動界面的內容。
C# :
FluentSplashScreenOptions op = new FluentSplashScreenOptions(); op.RightFooter = "Done"; SplashScreenManager.Default.SendCommand(FluentSplashScreenCommand.UpdateOptions, op);
VB.NET :
Dim op As New FluentSplashScreenOptions() op.RightFooter = "Done" SplashScreenManager.Default.SendCommand(FluentSplashScreenCommand.UpdateOptions, op)
DevExpress.XtraSplashScreen.FluentSplashScreenCommand類型枚舉支持的命令。
C# :
public enum FluentSplashScreenCommand { UpdateOptions, SubscribeToCustomDrawEvent }
VB.NET:
Public Enum FluentSplashScreenCommand UpdateOptions = 0 SubscribeToCustomDrawEvent = 1 End Enum