C#Outlook 2010表单区域控件 [英] C# Outlook 2010 Form Regions controls

查看:119
本文介绍了C#Outlook 2010表单区域控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

目前我无法访问表单区域上的Olk控件实例的Visible属性。为什么对于这些​​控件,我可以只执行MyControl.Property = value,但不能用于Visible属性,这对于Olk控件是不可用的。

为什么这个属性对用户不可用,是否有任何目的在做这样的事情?

另外,有没有一种简单的方法可以做到这一点?

谢谢,

Bhushan。

Hi all,
Currently I am having trouble accessing the Visible property of Olk controls instance on the Form Region. Why is it that for these controls, I can just do MyControl.Property = value but not in case of Visible property, which is not available for Olk controls.
Why is this property not available to user and is there any purpose being served doing such a thing?
Also, is there a easy way I can do this?
Thanks,
Bhushan.

推荐答案

对于使用C#使用VSTO和Outlook AddIn的任何人来说,它是直截了当的问题,这只是阅读帖子的问题。在那里我清楚地提到了Olk控件,它是表单区域上Outlook控件的前缀,而不是Windows窗体上的Windows控件。但是,目前,我必须执行以下操作来隐藏/取消隐藏表单区域上的控件:

MyControl.GetType()。GetProperty(Visible)。SetValue(MyControl,true,null) ;

,这对我有用。然而,问题仍然存在,为什么这一轮只针对这个属性?

谢谢,

Bhushan
For anyone working with VSTO and Outlook AddIn using C#, it is straight forward question and it is just a matter of reading the post. In that I have clearly made a mention of Olk controls which is a prefix for Outlook controls on a Form Region and not the windows controls on Windows Forms. However, currently, I have to do the following to Hide / UnHide the controls on a Form Region:
MyControl.GetType().GetProperty("Visible").SetValue(MyControl, true, null);
and that works for me. However, the question still remains, why this round about way only for this property alone?
Thanks,
Bhushan


这篇关于C#Outlook 2010表单区域控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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