从空白开始时不显示 VSTO Ribbon 解决方案 [英] VSTO Ribbon not showing when starting from blank Solution

查看:27
本文介绍了从空白开始时不显示 VSTO Ribbon 解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我从 File/New Project... 菜单创建一个新的Excel 2013 and 2016 VSTO Add-in"项目,然后 Project/Add New Item... -> Ribbon (Visual Designer),一切正常很好:当我启动应用程序时,我的功能区显示在 Excel 中.

If I create a new 'Excel 2013 and 2016 VSTO Add-in' Project from the File/New Project... menu, and then Project/Add New Item... -> Ribbon (Visual Designer), everything works fine: when I launch the App I have my Ribbon showing in Excel.

但是如果我首先创建一个空白解决方案",然后从文件/添加/新项目中添加一个 Excel VSTO 项目...:如果我在项目中添加一个功能区项目,它不会显示在 Excel 中.

But if I first create a 'Blank Solution', and then add an Excel VSTO Project from the File/Add/New Project...: if I add a Ribbon item in the project it does not show in Excel.

那一定意味着我必须在解决方案属性的某处设置对功能区的引用,但我找不到在哪里.有什么想法吗?

That must mean I have to set a reference to the Ribbon somewhere in the Solution properties, but I could not find where. Any ideas?

推荐答案

在设计视图中打开功能区(在何处添加按钮、标签等),如果 RibbonType = Microsoft.Excel.Workbook,则选择功能区并检查属性面板

Open ribbon in Design view (where do you add bottons, labels, etc.), select ribbon and check in properties panel if RibbonType = Microsoft.Excel.Workbook

希望能帮到你

这篇关于从空白开始时不显示 VSTO Ribbon 解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆