如何在ContextMenu(XML)中显示Screentips和Supertips的控件
我创建了一个ContextMenu,并添加了一个按钮,其唯一目的是在悬停在按钮上时显示Screentip和Supertip。
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="TestButton" label="Test" insertAfterMso="Forward" screentip="Screen Tip" supertip="Super Tip"/>
</contextMenu>
</contextMenus>
但是,悬停在按钮上不会显示任何屏幕截图或supertips,我不确定为什么会显示它们的选项。
如果上下文Menus
无法显示工具提示,则使用其他控件显示其工具提示?
我知道这个问题类似于 Outlook 2010 show Screentips和/或supertips是否添加到ContextMenu?中。。但是我找不到这个问题的明确答案。
I have created a contextMenu and added a button with the only purpose of displaying a screentip and supertip, while hovering over the button.
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="TestButton" label="Test" insertAfterMso="Forward" screentip="Screen Tip" supertip="Super Tip"/>
</contextMenu>
</contextMenus>
However, hovering over the button does not display any screentips or supertips and I'm unsure why that is, since the options to display them are available.
If contextMenus
are unable to display tooltips, is Outlook using a different control to display their tooltips?
I know this question is similar to Does Outlook 2010 show screentips and/or supertips for controls added to a contextMenu?. But I cannot find a definitive answer to the question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,Fluent UI不会向开发人员展示/提供所有功能。正如我之前写的那样,上下文菜单项不支持这些属性。您可以探索流利的UI XML方案,以查找是否支持哪些属性。在我的计算机上,文件位于
c:\ program Files(x86)\ Microsoft Visual Studio \ 2019 \ Professional \ Xml \ schemas \ 1033
文件夹中实际上取决于已安装的Visual Studio版本。另外,我建议您在主机办公室应用程序中启用功能区UI错误消息,以确保不会丢弃错误。默认情况下,如果VSTO加载项尝试操纵Microsoft Office用户界面(UI)并失败,则不会显示错误消息。但是,您可以配置Microsoft Office应用程序以显示与UI相关的错误的消息。您可以使用这些消息来帮助确定为什么未出现自定义功能区,或者为什么出现色带,但没有显示控件。请参阅如何:显示附加用户界面错误有关更多信息。
The Fluent UI doesn't expose/provide all the features to developers unfortunately. As I wrote earlier, context menu items don't support these properties. You can explore the Fluent UI XML scheme to find what properties are supported or not. On my machine the file is located in the
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Xml\Schemas\1033
folder which actually depends on the Visual Studio version installed.Also I'd recommend enabling ribbon UI error messages in the host Office application to make sure no errors are thrown. By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. See How to: Show Add-in user interface errors for more information.