private void ToggleWidgetWindow(WidgetWindow widgetWindow) { /* * widgetWindow.Owner = m_MainWindow; * if (widgetWindow.Visibility != Visibility.Visible) * { * widgetWindow.Opacity = 1.0f; * widgetWindow.Show(); * * WindowHelper.SetTopMostTransparent(widgetWindow); * } * else * { * widgetWindow.Opacity = 0.0f; * widgetWindow.Hide(); * } */ if (widgetWindow.Visibility != Visibility.Visible) { widgetWindow.Owner = m_MainWindow; widgetWindow.Show(); widgetWindow.Owner = null; WindowHelper.SetTopMostTransparent(widgetWindow); } else { widgetWindow.Hide(); } }
private void ApplicationStartup(object sender, StartupEventArgs e) { WidgetWindowViewModel widgetWindowViewModel = new WidgetWindowViewModel(); WidgetWindow widgetWindow = new WidgetWindow(widgetWindowViewModel); widgetWindow.Show(); MainWindowVIewModel mainWindowVIewModel = new MainWindowVIewModel(); MainWindow mainWindow = new MainWindow(mainWindowVIewModel); }
private void ToggleWidgetWindow(WidgetWindow widgetWindow) { if (widgetWindow.Visibility != Visibility.Visible) { widgetWindow.Owner = m_MainWindow; widgetWindow.Show(); widgetWindow.Owner = null; WindowHelper.SetTopMostTransparent(widgetWindow); } else { widgetWindow.Hide(); } }
public override void CreateWidget() { if (CreateUI == false) { return; } _widgetViewModel = new WidgetViewModel(); _widgetWindow = new WidgetWindow { DataContext = GearsetSettings.Instance }; _widgetWindow.ButtonList.ItemsSource = _widgetViewModel.ButtonActions; _widgetWindow.Show(); _windows.Add(_widgetWindow); }