Ejemplo n.º 1
0
 private void ButtonClick(object sender, WordButtonClickArgs e)
 {
     object smartPart = _rootWorkItem.SmartParts.AddNew<SampleSmartPart>();
     WindowSmartPartInfo info = new WindowSmartPartInfo();
     info.FormStartPosition = FormStartPosition.CenterScreen;
     info.MaximizeBox = false;
     info.MinimizeBox = false;
     info.Resizable = false;
     info.Title = "Custom Control";
     info.ShowInTaskbar = false;
     _rootWorkItem.Workspaces[WorkspaceNames.MainWorkspace].Show(smartPart, info);
 }
 private void Button_Click(CommandBarButton Ctrl, ref bool CancelDefault)
 {
     if ( Click != null )
     {
         WordButtonClickArgs args = new WordButtonClickArgs();
         args.CommandId = _commandId;
         Click(this, args);
     }
 }