WPF手风琴VerticalAlignment错误 [英] WPF Accordion VerticalAlignment bug
问题描述
使用最新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屋!