using SlnMesnac.WPF.Attribute; using System; using System.Windows; using System.Windows.Threading; namespace SlnMesnac.WPF.Page.Loading { /// /// LoadingWindow.xaml 的交互逻辑 /// [RegisterAsTransientAttribute] public partial class LoadingWindow : Window { public LoadingWindow() { InitializeComponent(); } protected override void OnClosed(EventArgs e) { base.OnClosed(e); // 停止 Dispatcher 消息循环 Dispatcher.BeginInvokeShutdown(DispatcherPriority.Background); } } }