我为Power Point开发了一个插件,我已将所有需要的控件放在功能区中
它很酷,一切都很好。但即使在我卸载我的插件后,功能点中也可以看到功能区,直到我重新启动计算机或需要到此处关闭
之后,当我再次重新打开电源点时,色带控制消失。为什么会如此?为什么它在没有安装插件的情况下不会立即消失..但是我已经为Word开发了插件并且也很好地工作了。只有我在PowerPoint中面对这个问题。
private void InitializeComponent()
{
this.tab1 = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
this.box1 = this.Factory.CreateRibbonBox();
this.ModelNameTextBox = this.Factory.CreateRibbonEditBox();
this.btnCHooseModelPath = this.Factory.CreateRibbonButton();
this.btnProjectBrowser = this.Factory.CreateRibbonButton();
this.btnRefresh = this.Factory.CreateRibbonButton();
this.tab1.SuspendLayout();
this.group1.SuspendLayout();
this.box1.SuspendLayout();
//
// tab1
//
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tab1.Groups.Add(this.group1);
this.tab1.Label = "EA Plug In";
this.tab1.Name = "tab1";
//
// group1
//
this.group1.Items.Add(this.box1);
this.group1.Items.Add(this.btnProjectBrowser);
this.group1.Items.Add(this.btnRefresh);
this.group1.Label = "Settings";
this.group1.Name = "group1";
//
// box1
//
this.box1.Items.Add(this.ModelNameTextBox);
this.box1.Items.Add(this.btnCHooseModelPath);
this.box1.Name = "box1";
//
// ModelNameTextBox
//
this.ModelNameTextBox.Label = "Select Model ";
this.ModelNameTextBox.Name = "ModelNameTextBox";
this.ModelNameTextBox.SizeString = "qqqqqqqqqqxxxxxxxxxxqqqqqqqqqq";
this.ModelNameTextBox.Text = null;
//
// btnCHooseModelPath
//
this.btnCHooseModelPath.Image = global::EAWIPpt.Properties.Resources.Browse;
this.btnCHooseModelPath.Label = "button1";
this.btnCHooseModelPath.Name = "btnCHooseModelPath";
this.btnCHooseModelPath.ScreenTip = "Open EAP model";
this.btnCHooseModelPath.ShowImage = true;
this.btnCHooseModelPath.ShowLabel = false;
this.btnCHooseModelPath.SuperTip = "Used to open EAP model";
this.btnCHooseModelPath.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnCHooseModelPath_Click);
//
// btnProjectBrowser
//
this.btnProjectBrowser.Label = "ProjectBrowser";
this.btnProjectBrowser.Name = "btnProjectBrowser";
this.btnProjectBrowser.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnProjectBrowser_Click);
//
// btnRefresh
//
this.btnRefresh.Label = "Refresh";
this.btnRefresh.Name = "btnRefresh";
this.btnRefresh.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnRefresh_Click);
//
// PptRibbon
//
this.Name = "PptRibbon";
this.RibbonType = "Microsoft.PowerPoint.Presentation";
this.Tabs.Add(this.tab1);
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.PptRibbon_Load);
this.tab1.ResumeLayout(false);
this.tab1.PerformLayout();
this.group1.ResumeLayout(false);
this.group1.PerformLayout();
this.box1.ResumeLayout(false);
this.box1.PerformLayout();
}
以上是我在Ribbon设计器的InitializeComponent中的代码