开发者

Is there any way for a user to make collapsed controls visible in a WPF app?

Would it be safe to include controls you only want for certain users in the same build if they are collapsed for ot开发者_如何转开发her users?

UDPATE: See answer, however if in you app you have some broker between the control and the action it invokes, i.e. regardless of whether you control can be seen or not the action cannot be performed, then you needn't worry. You should have this! Just like with a website you should not assume peforming an action means you can!


If you want to hide features or sensitive data then just setting Collapsed on the Visibility of the UI is not enough. Someone could use Snoop or similar tools and then simply change the Visibility to Visible.

Your best bet is to not add the control to the visual tree at all.

I also want to add that not adding controls to the visual tree that you don't need at the moment is a good idea performance wise too as even if the control is collapsed it will still be created and perform data binding.


hey, is this something like what you're looking for?

http://aappddeevv.blogspot.com/2008/11/wpf-visibility-and-hiding-controls.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜