예제 #1
0
        private static MessageBoxResult CallMsgBox(Window owner, string message, string title, MessageBoxButton messageBoxButton, MessageBoxXConfigurations configurations)
        {
            var msb = new MsgBox(owner, message, title, messageBoxButton, configurations);

            WindowX windowX = null;

            if (configurations.InteractOwnerMask && owner != null && owner is WindowX)
            {
                windowX = owner as WindowX;
            }

            windowX.IsMaskVisible = true;
            msb.ShowDialog();
            windowX.IsMaskVisible = false;

            return(msb.MessageBoxResult);
        }
예제 #2
0
        private static IPendingHandler CallPendingBox(Window owner, string message, string title, bool cancelable, PendingBoxConfigurations configurations)
        {
            var msb     = new Controls.Internal.PendingBox(owner, message, title, cancelable, configurations);
            var handler = new PendingHandler(() =>
            {
                msb.ForceClose();
            }, (s) =>
            {
                msb.UpdateMessage(s);
            });

            WindowX windowX = null;

            if (configurations.InteractOwnerMask && owner != null && owner is WindowX)
            {
                windowX = owner as WindowX;
            }

            if (windowX != null)
            {
                windowX.IsMaskVisible = true;
            }
            msb.Closed += (s, e) =>
            {
                if (windowX != null)
                {
                    windowX.IsMaskVisible = false;
                }
                handler.RaiseCanceledEvent(s, e);
            };
            msb.Canceled += (s, e) =>
            {
                handler.RaiseCanceledEvent(s, e);
            };
            msb.Show();

            return(handler);
        }
예제 #3
0
        private static void SetCaptionHeight(WindowX windowX, double height)
        {
            var action = new Action(() =>
            {
                var chrome = WindowChrome.GetWindowChrome(windowX);
                if (chrome == null)
                {
                    return;
                }
                chrome.CaptionHeight = height;
            });

            if (windowX.IsLoaded)
            {
                action();
            }
            else
            {
                windowX.Loaded += delegate
                {
                    action();
                };
            }
        }
예제 #4
0
 public static HorizontalAlignment GetButtonPanelHorizontalAlignment(WindowX windowX)
 {
     return((HorizontalAlignment)windowX.GetValue(ButtonPanelHorizontalAlignmentProperty));
 }
예제 #5
0
 public static Thickness GetButtonPanelMargin(WindowX windowX)
 {
     return((Thickness)windowX.GetValue(ButtonPanelMarginProperty));
 }
예제 #6
0
 public static bool GetInverseButtonsSequence(WindowX windowX)
 {
     return((bool)windowX.GetValue(InverseButtonsSequenceProperty));
 }
예제 #7
0
 public static DefaultButton GetDefaultButton(WindowX windowX)
 {
     return((DefaultButton)windowX.GetValue(DefaultButtonProperty));
 }
예제 #8
0
 public static Style GetButtonStyle(WindowX windowX)
 {
     return((Style)windowX.GetValue(ButtonStyleProperty));
 }
예제 #9
0
 public static Button GetYesButton(WindowX windowX)
 {
     return(windowX.ModalYesButton);
 }
예제 #10
0
 public static void SetBackground(WindowX windowX, Brush value)
 {
     windowX.SetValue(BackgroundProperty, value);
 }
예제 #11
0
 public static Brush GetBackground(WindowX windowX)
 {
     return((Brush)windowX.GetValue(BackgroundProperty));
 }
예제 #12
0
 public static void SetPadding(WindowX windowX, Thickness value)
 {
     windowX.SetValue(PaddingProperty, value);
 }
예제 #13
0
 public static Thickness GetPadding(WindowX windowX)
 {
     return((Thickness)windowX.GetValue(PaddingProperty));
 }
예제 #14
0
 public static void SetBackstageMaximizeButtonStyle(WindowX windowX, Style value)
 {
     windowX.SetValue(BackstageMaximizeButtonStyleProperty, value);
 }
예제 #15
0
 public static Style GetBackstageMaximizeButtonStyle(WindowX windowX)
 {
     return((Style)windowX.GetValue(BackstageMaximizeButtonStyleProperty));
 }
예제 #16
0
 public static void SetButtons(WindowX windowX, MessageBoxButton?value)
 {
     windowX.SetValue(ButtonsProperty, value);
 }
예제 #17
0
 public static Button GetCancelButton(WindowX windowX)
 {
     return(windowX.ModalCancelButton);
 }
예제 #18
0
 public static Brush GetBorderBrush(WindowX windowX)
 {
     return((Brush)windowX.GetValue(BorderBrushProperty));
 }
예제 #19
0
 public static Button GetNoButton(WindowX windowX)
 {
     return(windowX.ModalNoButton);
 }
예제 #20
0
 public static void SetBorderBrush(WindowX windowX, Brush value)
 {
     windowX.SetValue(BorderBrushProperty, value);
 }
예제 #21
0
 public static void SetButtonStyle(WindowX windowX, Style value)
 {
     windowX.SetValue(ButtonStyleProperty, value);
 }
예제 #22
0
 public static Thickness GetBorderThickness(WindowX windowX)
 {
     return((Thickness)windowX.GetValue(BorderThicknessProperty));
 }
예제 #23
0
 public static void SetDefaultButton(WindowX windowX, DefaultButton value)
 {
     windowX.SetValue(DefaultButtonProperty, value);
 }
예제 #24
0
 public static void SetBorderThickness(WindowX windowX, Thickness value)
 {
     windowX.SetValue(BorderThicknessProperty, value);
 }
예제 #25
0
 public static void SetInverseButtonsSequence(WindowX windowX, bool value)
 {
     windowX.SetValue(InverseButtonsSequenceProperty, value);
 }
예제 #26
0
 public static MessageBoxButton?GetButtons(WindowX windowX)
 {
     return((MessageBoxButton?)windowX.GetValue(ButtonsProperty));
 }
예제 #27
0
 public static void SetButtonPanelMargin(WindowX windowX, Thickness value)
 {
     windowX.SetValue(ButtonPanelMarginProperty, value);
 }
예제 #28
0
 public static object GetCancelButtonContent(WindowX windowX)
 {
     return((object)windowX.GetValue(CancelButtonContentProperty));
 }
예제 #29
0
 public static void SetButtonPanelHorizontalAlignment(WindowX windowX, HorizontalAlignment value)
 {
     windowX.SetValue(ButtonPanelHorizontalAlignmentProperty, value);
 }
예제 #30
0
 public static void SetCancelButtonContent(WindowX windowX, object value)
 {
     windowX.SetValue(CancelButtonContentProperty, value);
 }