void timer_Elapsed(object sender, ElapsedEventArgs e) { Dispatcher.BeginInvoke((Action) delegate() { AppBarFunctions.SetAppBar(this, ABEdge.Right); }); }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.Height = StatusBarHeight; AppBarFunctions.SetAppBar(this, ABEdge.Top); HideFromTab(); }
public void dock() { string dockStr = Properties.Settings.Default.dockEdge; //dockStr is set to the value of the setting which //defines which screen edge to dock to if (dockStr == "Bottom") { AppBarFunctions.SetAppBar(this, ABEdge.Bottom); } else if (dockStr == "Top") { AppBarFunctions.SetAppBar(this, ABEdge.Top); } //Using the WpfAppBar package, the window is //made into an AppBar, at the top or bottom edge //according to dockStr }
private void Window_Loaded(object sender, RoutedEventArgs e) { // Auf 2tem Bildschirm öffnen if (System.Windows.Forms.Screen.AllScreens.Length > 1) { System.Windows.Forms.Screen s2 = System.Windows.Forms.Screen.AllScreens[1]; System.Drawing.Rectangle r2 = s2.WorkingArea; Top = r2.Top; Left = r2.Left; } else { System.Windows.Forms.Screen s1 = System.Windows.Forms.Screen.AllScreens[0]; System.Drawing.Rectangle r1 = s1.WorkingArea; Top = r1.Top; Left = r1.Left; } AppBarFunctions.SetAppBar(this, ABEdge.Left); }
public void FixSize() { AppBarFunctions.SetAppBar(this, ABEdge.None); AppBarFunctions.SetAppBar(this, ABEdge.Top); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.None); System.Windows.Application.Current.Shutdown(); }
public void undock() { AppBarFunctions.SetAppBar(this, ABEdge.None); }
private void SetAsAppBar(ABEdge edge) { _currentAppBarEdge = edge; AppBarFunctions.SetAppBar(this, edge, topMost: Settings.Topmost); }
private void AppBar_OnClick(object sender, RoutedEventArgs e) { AppBar.IsEnabled = false; Normal.IsEnabled = true; AppBarFunctions.SetAppBar(this, ABEdge.Left, grid); }
private void Normal_OnClick(object sender, RoutedEventArgs e) { Normal.IsEnabled = false; AppBar.IsEnabled = true; AppBarFunctions.SetAppBar(this, ABEdge.None); }
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { AppBarFunctions.SetAppBar(this, ABEdge.Right); }
private void Window_Closing(object sender, EventArgs e) { #if !DEBUG AppBarFunctions.SetAppBar(this, ABEdge.None); #endif }
private void Window_Loaded(object sender, RoutedEventArgs e) { #if !DEBUG AppBarFunctions.SetAppBar(this, ABEdge.Left, null, false); #endif }
private void App_Close(object sender, RoutedEventArgs e) { //Função p normalizar a ancoragem quando a aplicação fechar e não dar bug no Explorer AppBarFunctions.SetAppBar(this, ABEdge.None); this.Close(); }
private void Grid_Loaded_1(object sender, RoutedEventArgs e) { //Seta a janela pra fiar ancorada no canto esquerdo da tela (ABEdge.Left). Isso diz respeito a biblioteca WpfAppBar AppBarFunctions.SetAppBar(this, ABEdge.Left); }