RibbonComboBox 选定的图库项目在鼠标离开时恢复为旧值 [英] RibbonComboBox selected gallery item reverts to old value on mouse leave
问题描述
我已将 WPF 功能区替换为最新的库,组合框选择更改会触发数据网格的重新加载.我对 RibbonComboBox 有问题.
i have replaced WPF ribbons to the newest library, the combobox selection changed triggers reload of datagrid. I have problem with the RibbonComboBox.
如果我用鼠标光标离开所选项目,则所选项目将恢复为旧项目.如果我将光标保持在所选项目上,直到数据网格重新加载完成,则新值会被 Ribboncombobox 接受.
If i leave with mousecursor out of the selected item, the selected item is reverted to the old item. if i keep cursor on the selected item until the datagrid reload is finished, the new value is accepted to the ribboncombobox.
我是否错过了一些特殊的ribboncombobox 属性以仅通过单击接受更改,或者这是组合框组件中的错误?唯一可能的解决方法是在线程中启动数据网格重新加载功能,让功能区组合框完成其进程.
Do i miss some special ribboncombobox property to accept change by click only or this is a bug in the combobox component? only possible workaround would be launch datagrid reload function in thread to let the ribbon combobox finish its processes.
此处的示例代码:
<r:RibbonComboBox>
<r:RibbonGallery SelectedValuePath="Content" SelectionChanged="pgSize_SelectionChanged">
<r:RibbonGalleryCategory>
<r:RibbonGalleryItem Tag="20" Content="Size (20)" Foreground="Green" />
<r:RibbonGalleryItem Tag="30" Content="Size (30)" Foreground="Green" IsSelected="True"/>
<r:RibbonGalleryItem Tag="50" Content="Size (50)" Foreground="Orange" />
<r:RibbonGalleryItem Tag="100" Content="Size (100)" Foreground="Red" />
</r:RibbonGalleryCategory>
</r:RibbonGallery>
</r:RibbonComboBox>
推荐答案
这是功能区控件中的错误.请参阅连接错误报告.
This is a bug in the ribbon control. See the Connect bug report.
这篇关于RibbonComboBox 选定的图库项目在鼠标离开时恢复为旧值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!