Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何基于打开的邮件显示/隐藏outlook功能区(VSTO)?_C#_Vsto_Outlook Addin - Fatal编程技术网

C# 如何基于打开的邮件显示/隐藏outlook功能区(VSTO)?

C# 如何基于打开的邮件显示/隐藏outlook功能区(VSTO)?,c#,vsto,outlook-addin,C#,Vsto,Outlook Addin,目前,我创建了一个定制的VSTO outlook附加组件,并使其在我们生成的电子邮件上工作。但是,即使用户打开其他邮件,此自定义功能区也始终显示。所以我的问题是:当且仅当打开的邮件满足某些条件时,是否可以显示/隐藏功能区选项卡;例如,主题包含指定的单词 提前Thx。是的,这是可能的。定义功能区回调,尤其是您对getVisible感兴趣的回调,并在需要隐藏或显示功能区控件时使用或。getVisible回调具有以下签名: C#: bool GetVisible(IRibbonControl

目前,我创建了一个定制的VSTO outlook附加组件,并使其在我们生成的电子邮件上工作。但是,即使用户打开其他邮件,此自定义功能区也始终显示。所以我的问题是:当且仅当打开的邮件满足某些条件时,是否可以显示/隐藏功能区选项卡;例如,主题包含指定的单词


提前Thx。

是的,这是可能的。定义功能区回调,尤其是您对
getVisible
感兴趣的回调,并在需要隐藏或显示功能区控件时使用或。
getVisible
回调具有以下签名:

    
C#: bool GetVisible(IRibbonControl control)

VBA: Sub GetVisible(control As IRibbonControl, ByRef visible)

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] VARIANT_BOOL *pvarfVisible)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean
例如,如果外接程序编写器为按钮实现了
getImage
回调过程,则调用该函数一次,加载图像,然后如果需要更新图像,则使用缓存的图像,而不是调用该过程。在外接程序通过使用
InvalidateControl
方法发出缓存值无效的信号之前,此过程对控件保持不变,此时将再次调用回调过程并缓存返回响应

在以下系列文章中阅读有关Fluent UI(也称为Ribbon UI)的更多信息: