public static DialogResult ShowDesignerDialog(string title, Wpf.UIElement wpfContent, int width, int height)
 {
     DesignerDialog dlg = new DesignerDialog(title, wpfContent);
     dlg.Width = width;
     dlg.Height = height;
     dlg.SizeGripStyle = SizeGripStyle.Hide;
     return dlg.ShowDialog();
 }
        public static DialogResult ShowDesignerDialog(string title, Wpf.UIElement wpfContent, int width, int height)
        {
            DesignerDialog dlg = new DesignerDialog(title, wpfContent);

            dlg.Width         = width;
            dlg.Height        = height;
            dlg.SizeGripStyle = SizeGripStyle.Hide;
            return(dlg.ShowDialog());
        }
        /// <summary>
        ///     Opens the Edit Property-Bound Columns dialog for the given DataGrid
        /// </summary>
        public static void EditPropertyBoundColumns(ModelItem dataGridModelItem, EditingContext editingContext)
        {
            using (ModelEditingScope scope = dataGridModelItem.BeginEdit(Properties.Resources.ColumnsChanged))
            {
                PropertyColumnEditor ui = new PropertyColumnEditor(editingContext, dataGridModelItem);

                // Use Windows Forms to show the design time because Windows Forms knows about the VS message pump
                System.Windows.Forms.DialogResult result = DesignerDialog.ShowDesignerDialog(Properties.Resources.Edit_Property_Bound_Columns_Dialog_Title, ui);
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    scope.Complete();
                }
                else
                {
                    scope.Revert();
                }
            }
        }