예제 #1
0
 void timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     Dispatcher.BeginInvoke((Action) delegate()
     {
         AppBarFunctions.SetAppBar(this, ABEdge.Right);
     });
 }
예제 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.Height = StatusBarHeight;

            AppBarFunctions.SetAppBar(this, ABEdge.Top);
            HideFromTab();
        }
예제 #3
0
        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
        }
예제 #4
0
        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);
        }
예제 #5
0
 public void FixSize()
 {
     AppBarFunctions.SetAppBar(this, ABEdge.None);
     AppBarFunctions.SetAppBar(this, ABEdge.Top);
 }
예제 #6
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     AppBarFunctions.SetAppBar(this, ABEdge.None);
     System.Windows.Application.Current.Shutdown();
 }
예제 #7
0
 public void undock()
 {
     AppBarFunctions.SetAppBar(this, ABEdge.None);
 }
예제 #8
0
 private void SetAsAppBar(ABEdge edge)
 {
     _currentAppBarEdge = edge;
     AppBarFunctions.SetAppBar(this, edge, topMost: Settings.Topmost);
 }
예제 #9
0
 private void AppBar_OnClick(object sender, RoutedEventArgs e)
 {
     AppBar.IsEnabled = false;
     Normal.IsEnabled = true;
     AppBarFunctions.SetAppBar(this, ABEdge.Left, grid);
 }
예제 #10
0
 private void Normal_OnClick(object sender, RoutedEventArgs e)
 {
     Normal.IsEnabled = false;
     AppBar.IsEnabled = true;
     AppBarFunctions.SetAppBar(this, ABEdge.None);
 }
예제 #11
0
 private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
 {
     AppBarFunctions.SetAppBar(this, ABEdge.Right);
 }
예제 #12
0
        private void Window_Closing(object sender, EventArgs e)
        {
#if !DEBUG
            AppBarFunctions.SetAppBar(this, ABEdge.None);
#endif
        }
예제 #13
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
#if !DEBUG
            AppBarFunctions.SetAppBar(this, ABEdge.Left, null, false);
#endif
        }
예제 #14
0
 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();
 }
예제 #15
0
 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);
 }