[VSTO]形成区域扩大。 [英] [VSTO ]Form region expanding.

查看:96
本文介绍了[VSTO]形成区域扩大。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在VSTO Outlook中允许用户扩展表单区域(邻接模式)?


因为当我设置高度并重排它时,它会自动设置为MaxHeight。


加载后用户只能折叠它。并在初始最大高度状态下展开。


谢谢。

解决方案

您好timaiv,


>>我如何在VSTO Outlook中允许用户扩展表单区域(邻接模式)?


您是否要允许用户调整大小并记住当前的区域大小?如果是这样,那是不可能的。


我们可以通过以下代码重置区域大小?但是,我们无法获得用户调整大小的当前高度。

 private void button1_Click(object sender,EventArgs e)
{
WindowFormRegionCollection formRegions =
Globals.FormRegions
[Globals.ThisAddIn.Application.ActiveExplorer()];
formRegions.FormRegion1.Size = new System.Drawing.Size(100,500);
}

最好的问候,


Tao Zhou


How i can in VSTO Outlook allow user to expand form region (adjoining mode)?

Because when i set height and reflow it, it automatically sets as MaxHeight too.

And after loading user can only collapse it. And expand in initial maxheight state.

Thanks.

解决方案

Hi timaiv,

>> How i can in VSTO Outlook allow user to expand form region (adjoining mode)?

Do you want to allow user to resize and remember the current size of region? If so, it is impossible.

What we could achieve is resetting the region size by code below? But, we could not get the current height what user resized.

        private void button1_Click(object sender, EventArgs e)
        {
            WindowFormRegionCollection formRegions =
                Globals.FormRegions
                    [Globals.ThisAddIn.Application.ActiveExplorer()];
            formRegions.FormRegion1.Size = new System.Drawing.Size(100,500);
        }

Best Regards,

Tao Zhou


这篇关于[VSTO]形成区域扩大。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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