WPF手风琴VerticalAlignment错误 [英] WPF Accordion VerticalAlignment bug

查看:92
本文介绍了WPF手风琴VerticalAlignment错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用最新WPF工具包中的Accordion控件遇到了这个问题。
当手风琴控件的VerticalAlignment设置为拉伸时,如果SelectionMode设置为一个,则其中包含的AccordionItems将不再扩展。如果选择模式设置为 ZeroOrOne,则在多次尝试单击后会得到扩展。如果将其设置为 ZeroOrMore,则会在屏幕底部丢失手风琴项目的地方发生一些非常时髦的事情!



有人找到解决这个问题的方法了吗? p>

谢谢!

解决方案

一个好的解决方法是绑定 ActualHeight ActualWidth 到要填充的父元素。这有点hack,但是可以用。



Using the Accordion control from the latest WPF toolkit i came across this issue. When an accordion control has its VerticalAlignment set to 'Stretch' the AccordionItems contained within it will no longer expand if the SelectionMode is set to 'One'. If the selection mode is set to 'ZeroOrOne' you get expansion after several attempts at clicking. If it is set to 'ZeroOrMore' some really funky stuff happens where accordion items go missing off the bottom of the screen!

Anyone found a solution for this problem?

Thanks!

解决方案

An OK workaround is to bind the ActualHeight and ActualWidth to the parent element you want it to fill. This is a bit of a hack but it will work.

这篇关于WPF手风琴VerticalAlignment错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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