开发者

Change the ComboBox Popup control to be right-aligned with the its parent

开发者 https://www.devze.com 2022-12-22 04:04 出处:网络
I\'m trying to get a ComboBox to display its Popup right aligned rather th开发者_高级运维an left-aligned as is the default.

I'm trying to get a ComboBox to display its Popup right aligned rather th开发者_高级运维an left-aligned as is the default. I mean I want the right edge of the Popup to be aligned with the right edge of its parent.

I tried overriding the ComboBox class but that didn't quite work as the Popup HorizontalOffset seems to be reset somehow. I thought that would be a fairly easy change but I can't find any resource talking about this issur.


In the ComboBox style change the flowDirection of the popup to RightToLeft.

<Style  TargetType="ComboBox">
     <Popup x:Name="Popup" FlowDirection="RightToLeft">
</Style>
0

精彩评论

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

关注公众号