-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Settings] Fix flyout position when ComboBox is aligned to the right #31
[Settings] Fix flyout position when ComboBox is aligned to the right #31
Conversation
建议暂时不要合并,正在尝试更好的解决方案 |
还没打算合并,等待你修改完成,今天晚上natsurainko估计会修改一部分代码,注意merge分支哈 |
//TODO: combobox.items are not necessarily ComboBoxItems | ||
// var cont = comboBox.ContainerFromIndex(0); | ||
// var a = comboBox.ItemContainerGenerator.ContainerFromItem(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本来应该用ItemContainerGenerator获取容器宽度的,但是这一组API好像已经弃用了(ItemContainerGenerator Class | MS Learn),使用GenerateNext
也总是返回null
,不确定是不是控件加载顺序的问题。
现在的方法是new TextBlock然后获取DesiredSize加上一个固定的宽度,对于string类型的ComboBoxItem没问题,如果设置了ItemTemplate就不能用。
Fix #30 #28 (partial)