Exemplo n.º 1
0
        public static void UpdateWindowCommandsForFlyout(this MetroWindow window, Flyout flyout)
        {
            var currentTheme = GetCurrentTheme(window);

            window.ChangeAllWindowCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentTheme);
            window.ChangeAllWindowButtonCommandsBrush(window.OverrideDefaultWindowCommandsBrush ?? flyout.Foreground, currentTheme, flyout.Theme, flyout.Position);
        }
Exemplo n.º 2
0
        public static void ResetAllWindowCommandsBrush(this MetroWindow window)
        {
            var currentTheme = GetCurrentTheme(window);

            window.ChangeAllWindowCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentTheme);
            window.ChangeAllWindowButtonCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentTheme);
        }
Exemplo n.º 3
0
        public static void UpdateWindowCommandsForFlyout(this MetroWindow window, Flyout flyout)
        {
            var currentAppTheme = ThemeManager.DetectTheme(window)
                                  ?? (Application.Current.MainWindow is MetroWindow metroWindow ? ThemeManager.DetectTheme(metroWindow) : null)
                                  ?? ThemeManager.DetectTheme(Application.Current);

            window.ChangeAllWindowCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentAppTheme);
            window.ChangeAllWindowButtonCommandsBrush(window.OverrideDefaultWindowCommandsBrush ?? flyout.Foreground, currentAppTheme, flyout.Theme, flyout.Position);
        }
Exemplo n.º 4
0
        public static void ResetAllWindowCommandsBrush(this MetroWindow window)
        {
            var currentAppTheme = ThemeManager.DetectTheme(window)
                                  ?? (Application.Current.MainWindow is MetroWindow metroWindow ? ThemeManager.DetectTheme(metroWindow) : null)
                                  ?? ThemeManager.DetectTheme(Application.Current);

            window.ChangeAllWindowCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentAppTheme);
            window.ChangeAllWindowButtonCommandsBrush(window.OverrideDefaultWindowCommandsBrush, currentAppTheme);
        }
 public static void UpdateWindowCommandsForFlyout(this MetroWindow window, Flyout flyout)
 {
     window.ChangeAllWindowButtonCommandsBrush(flyout.Foreground, flyout.Position);
 }
 public static void ResetAllWindowCommandsBrush(this MetroWindow window)
 {
     window.ChangeAllWindowCommandsBrush(window.OverrideDefaultWindowCommandsBrush);
     window.ChangeAllWindowButtonCommandsBrush(window.OverrideDefaultWindowCommandsBrush);
 }