Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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.
Posted
Comments
Maciej Los 18-Dec-13 2:46am    
We can't read in your mind and we can't see your screen. So...
Please, share your code (the declaration of MyControl.Porperty).

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900