private bool UpdateUI() { IsMaskVisible = false; //初始化颜色 if (!LoadingMain(false)) { Application.Current.Shutdown(); } //版本号 Versionon.Text = "Version - " + stVersion; //刷新工具列表 UpdateList.ItemsSource = listall; //工具列表样式 this.UpdateList.Foreground = baseColor.Fg; this.UpdateList.FontFamily = baseColor.Fonts; this.UpdateList.FontSize = 14; //版本号样式 this.Versionon.Foreground = baseColor.Fg; this.Versionon.FontFamily = baseColor.Fonts; this.Versionon.FontSize = 12; //按钮样式 this.Feedback.Foreground = baseColor.FontM; this.Feedback.FontFamily = baseColor.Fonts; this.Feedback.FontSize = 14; this.OpenButton.Foreground = baseColor.FontM; this.OpenButton.Background = baseColor.Main; this.B1.Foreground = baseColor.Fg; this.B2.Foreground = baseColor.Fg; this.TopIcon.Background = baseColor.Main; this.TopIcon.Foreground = baseColor.FontM; ButtonHelper.SetHoverBrush(TopIcon, baseColor.Main); ButtonHelper.SetClickCoverOpacity(TopIcon, 1); //初始化卡片颜色 WindowXCaption.SetBackground(this, baseColor.Main); WindowXCaption.SetForeground(this, baseColor.FontM); CD1.Background = baseColor.Card; CD2.Background = baseColor.Card; SH1.Background = baseColor.Card; SH1.Foreground = baseColor.Font; UpdateList.Background = baseColor.Tran; Versionon.Foreground = baseColor.Fg; UpdateList.ContextMenu.Background = baseColor.Card; UpdateList.ContextMenu.Foreground = baseColor.Fg; ContextMenuHelper.SetShadowColor(UpdateList.ContextMenu, baseColor.DBg.Color); BorderBut.Background = baseColor.DBg; BorderTop.Background = baseColor.Main; BorderTop1.Background = baseColor.Main; BorderTop2.Background = baseColor.Main; BG.BeginInit(); BG.Source = baseColor.Bgp; BG.EndInit(); SBG.BeginInit(); SBG.Source = baseColor.Bgps; SBG.EndInit(); //加载主页 PageMain main = new PageMain(); Page.Content = new Frame() { Content = main }; return(true); }