将Outlook 2013中的自定义窗格调整为超出某一点,将挂起 [英] Resizing Custom pane in outlook 2013 beyond a point, hangs

查看:98
本文介绍了将Outlook 2013中的自定义窗格调整为超出某一点,将挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Outlook 2013中遇到了一个VSTO加载项问题。当我们尝试将自定义任务窗格扩展到某个点之外时,它会挂起并且"功能区"按钮不处于活动状态。有没有办法在属性
或编程方式中设置自定义窗格的最大宽度。如果我尝试设置最大宽度,仍然可以展开自定义窗格,如果我在调整大小超过此点时发送ESC键,则邮件将关闭。

解决方案

      ;                        &NBSP ;                        &NBSP ;                        &NBSP ;                        &NBSP ;            & NBSP;                                                                                         


每当宽度发生变化时,您都可以检查自定义窗格的宽度,


如果宽度超出您设置的最大值,则可以将其更改为最大值。


我们可以在CustomTaskPane.Control.SizeChanged中编写代码,因为它可以响应宽度变化。


自定义方法:


 


< p style ="margin:0px"> taskPane.Control.Siz eChanged + =
EventHandler (Control_SizeChanged);


 


这是方法


 


私人 void Control_SizeChanged( object 发件人,
EventArgs e)


        {


           
如果 (taskPane.Width> 500)


            {


                taskPane.Width = 500;


           }


       }


 


我的项目是根据链接中的代码构建的。


Outlook中的自定义任务窗格


以下是一些关于自定义任务窗格的链接


CustomTaskPane
接口


CustomTaskPane.Width属性


CustomTaskPane.Control属性


 


希望对您有帮助。


We are getting an issue in outlook 2013 with one of our VSTO Add-ins. When we try to expand the custom task pane beyond a point, it hangs and the Ribbon buttons are not active. Is there any way to set the maximum width of the custom pane in the properties or programmatically. If I try to set the maximum width, still the custom pane can be expanded and if I send ESC key press while resizing beyond this point, the mail closes.

解决方案

Hi,                                                                                                                                                                                                            

You could check width of the custom pane whenever the width changes,

If the width beyonds the maximum you set,than you could change it to the maximum.

We can write code in CustomTaskPane.Control.SizeChanged because it can response with width changing.

Customize method:

 

taskPane.Control.SizeChanged += newEventHandler(Control_SizeChanged);

 

Here is the method

 

privatevoidControl_SizeChanged(objectsender, EventArgse)

        {

            if(taskPane.Width > 500)

            {

                taskPane.Width = 500;

            }

        }

 

My project built based on the code in the link.

Custom Task Panes in outlook

Here are some links about custom task pane

CustomTaskPane Interface

CustomTaskPane.Width Property

CustomTaskPane.Control Property

 

Hope that can help you.


这篇关于将Outlook 2013中的自定义窗格调整为超出某一点,将挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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