Chinaunix首页 | 论坛 | 博客
  • 博客访问: 496975
  • 博文数量: 105
  • 博客积分: 2922
  • 博客等级: 少校
  • 技术积分: 1113
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-02 16:30
文章分类

全部博文(105)

文章存档

2018年(1)

2016年(2)

2015年(3)

2014年(6)

2013年(21)

2012年(10)

2011年(8)

2010年(7)

2009年(31)

2008年(16)

我的朋友

分类: 嵌入式

2012-04-14 12:33:43

3. Visibility Property

Before i started learning the wonders of , i worked with WinForms. With WinForms, life was simple, a Form or Component was either Visible = true or Visible = false. Along comes stomping all over WinForms and worst of all forcing its three states of visibility on us!

After i found out what that third state was, i was willing to forgive because its pretty handy. the third state is:

usrAddBtn.Visibility = System.Windows.Visibility.Collapsed;

 

Collapsed makes the Element not only invisible but doesn’t reserve the space within the Parent Element. What does this mean in the real world? well it means that you could collapse a Panel and place a new Panel in its placed. This means that instead of creating new Windows for settings pages for example,  you can reuse the space of your main Window.

阅读(1590) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~