private void Window_Loaded(object sender, RoutedEventArgs e) { this.DataContext = VMController.CreateVM(); //if (Common.IsWin10) //{ // WindowBlur.SetIsEnabled(this, true); // DataContext = new WindowBlureffect(this, AccentState.ACCENT_ENABLE_ACRYLICBLURBEHIND) { BlurOpacity = 100 }; //} //if (Environment.OSVersion.Version.Major >= 6) // Win32Api.SetProcessDPIAware(); #region 注释 //WindowInteropHelper wndHelper = new WindowInteropHelper(this); //int exStyle = (int)Win32Api.GetWindowLong(wndHelper.Handle, (int)Win32Api.GetWindowLongFields.GWL_EXSTYLE); //exStyle |= (int)Win32Api.ExtendedWindowStyles.WS_EX_TOOLWINDOW; //Win32Api.SetWindowLong(wndHelper.Handle, (int)Win32Api.GetWindowLongFields.GWL_EXSTYLE, (IntPtr)exStyle); #endregion //SetLightDark(SetConfig()); //Win32Api.HwndSourceAdd(this); }