Esempio n. 1
0
 /// <summary>
 /// This function is the callback used to execute a command when the a menu item is clicked.
 /// See the Initialize method to see how the menu item is associated to this function using
 /// the OleMenuCommandService service and the MenuCommand class.
 /// </summary>
 //<snippet21>
 private void MenuItemCallback(object sender, EventArgs e)
 {
     // Create the dialog instance without Help support.
     var d = new MyModalDialog();
     // Show the dialog.
     var m = d.ShowModal();
 }
        //</snippet13>

        private void btnYes_Click(object sender, RoutedEventArgs e)
        {
            var v = new MyModalDialog("Microsoft.VisualStudio.PlatformUI.DialogWindow");

            v.Content = "Here you go.";
            v.ShowModal();
            this.Close();
        }