积极答复者
关于expander控件的一些问题

问题
答案
-
你这个问题需要改Expander的模板了,代码太多,我上传到skydrive上了,你可以下载下来参考一下:
http://cid-41e44c402aaada87.office.live.com/browse.aspx/ExpanderTest?uc=1
你的第二个问题是因为ScrollViewer里面的content也就是你的expander没有设置高度的原因,你可以尝试着设置一下Expander的MaxHeight。如果还是不行,给我提供一些代码看看。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Colinfc 2011年4月14日 5:06
全部回复
-
你这个问题需要改Expander的模板了,代码太多,我上传到skydrive上了,你可以下载下来参考一下:
http://cid-41e44c402aaada87.office.live.com/browse.aspx/ExpanderTest?uc=1
你的第二个问题是因为ScrollViewer里面的content也就是你的expander没有设置高度的原因,你可以尝试着设置一下Expander的MaxHeight。如果还是不行,给我提供一些代码看看。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Colinfc 2011年4月14日 5:06
-
我不确定我的办法是最好的,一般遇到你这样的需求我是这样想的。
首先确认这个是不是需要改变默认的模板,如果这个需求是要改变默认模板的,那么你就拿到默认模板,然后看模板的代码,哪一部分你想改掉的,然后你就改好了。
要求就是你能看懂xaml代码就行,其他的随便改就好。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
源码我上传到Skydrive上了,你可以下载:
http://cid-41e44c402aaada87.office.live.com/self.aspx/WPFThemes/WPFThemes.zip
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.