更改Outlook VSTO插件上的默认图标 [英] Changing the default Icon on an Outlook VSTO addin

查看:166
本文介绍了更改Outlook VSTO插件上的默认图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我开发了一个outlook插件,使用visual studio 2015,插件按预期工作,并加载到outlook中预约窗口的正确位置不想添加自定义功能区或标签,我只想编辑它默认插入的图标
,因为它已经在正确的位置。


但我找不到在哪里可以更改此图标?是否存在与当前版本最新的指南或分步流程。我已经阅读了大约20个不同的链接但是没有成功我最近找到的是你需要将数字
59更改为你需要的图标,但是下面的方法在我的代码中无处可见:

 Command command = commands.AddNamedCommand2(_addInInstance,
" MyAddin1"," MyAddin1"," Executes the MyAddin1",
true,59,ref contextGUIDS,(int)vsCommandStatus。
vsCommandStatusSupported +(int)vsCommandStatus。
vsCommandStatusEnabled,(int)vsCommandStyle。
vsCommandStylePictAndText,vsCommandControlType
.vsCommandControlTypeButton);

任何帮助都将不胜感激。


谢谢。


解决方案

您好,


不推荐使用命令栏,不应再使用它们。相反,您需要使用Fluent UI在加载项中创建自定义UI。 VSTO提供了两种创建自定义UI的主要方法:


演练:使用功能区XML创建自定义选项卡


演练:使用功能区设计器创建自定义选项卡


Fluent UI(又名Ribbon UI)在以下系列文章中有详细描述:


为开发人员自定义2007 Office Fluent功能区(第1部分,共3部分)


为开发人员定制2007 Office Fluent功能区(第2部分,共3部分)


Customiz 2007 Office Fluent Ribbon for Developers(第3部分,共3部分)



Hi Everyone

I have developed an outlook addin, using visual studio 2015 , the addin works as expected and loads in the correct place on the appointment window in outlook, i dont want to add a custom ribbon or tab, i simply want to edit this icon that it inserts by default as it is in the correct place already.

But i cannot find anywhere to change this icon? is there a guide or a step by step process that is up to date with the current versions. I have read about 20 different links with no success the closest i have found is this where you need to change the number 59 to the icon you need, however the below method is no where to be seen in my code:

Command command = commands.AddNamedCommand2(_addInInstance, 
"MyAddin1", "MyAddin1", "Executes the command for MyAddin1", 
true, 59, ref contextGUIDS, (int)vsCommandStatus.
vsCommandStatusSupported+(int)vsCommandStatus.
vsCommandStatusEnabled, (int)vsCommandStyle.
vsCommandStylePictAndText, vsCommandControlType
.vsCommandControlTypeButton);

Any help will be appreciated.

Thanks.

解决方案

Hello,

Command bars were deprecated and should not be used any longer. Instead, you need to use the Fluent UI for creating a custom UI in your add-in. VSTO provides two main ways for creating a custom UI:

Walkthrough: Creating a Custom Tab by Using Ribbon XML

Walkthrough: Creating a Custom Tab by Using the Ribbon Designer

The Fluent UI (aka Ribbon UI) is described in depth in the following series of articles:

Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)

Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)

Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)


这篇关于更改Outlook VSTO插件上的默认图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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