コード例 #1
0
        /// <summary>
        /// CheckBoxContentProperty property changed handler.
        /// </summary>
        /// <param name="d">MessageBoxWindow that changed its CheckBoxContent.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnCheckBoxContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MessageBoxWindow source = d as MessageBoxWindow;
            object           value  = e.NewValue as object;

            if (value == null)
            {
                source.CheckBoxVisibility = Visibility.Collapsed;
            }
            else
            {
                source.CheckBoxVisibility = Visibility.Visible;
            }
        }
コード例 #2
0
        //private bool _clicked;

        public static MessageBoxWindow Show(string text, string caption, string leftButton, string rightButton, string checkBoxContent)
        {
            var win = new MessageBoxWindow();

            win.Content         = text;
            win.Header          = caption;
            win.LeftButtonText  = leftButton;
            win.RightButtonText = rightButton;
            win.CheckBoxContent = checkBoxContent;

            win.InsertIntoFrame();

            return(win);
        }
コード例 #3
0
        //private bool _clicked;

        public static MessageBoxWindow Show(string text, string caption, string leftButton, string rightButton, string checkBoxContent)
        {
            var win = new MessageBoxWindow();
            win.Content = text;
            win.Header = caption;
            win.LeftButtonText = leftButton;
            win.RightButtonText = rightButton;
            win.CheckBoxContent = checkBoxContent;

            win.InsertIntoFrame();

            return win;
        }