我得到2个RibbonCombobox,第一个 FiltreEtatPays 和第二个 FiltreEtatType ,fisrt RibbonCombobox的选定值正在推动第二个的内容。因此,当第一个RibbonCombobox的selectedItem发生变化时,我想清理第二个RibbonCombobox的显示值。
我得到以下xaml
<ribbon:RibbonComboBox x:Name="FiltreEtatPays" Label="Pays" Grid.Column="1" Grid.Row="0">
<ribbon:RibbonGallery Name="GallEtatPays" SelectionChanged="GallEtatPays_SelectionChanged">
<ribbon:RibbonGalleryCategory Name="GalEtatPays" ItemsSource="{Binding}"/>
</ribbon:RibbonGallery>
</ribbon:RibbonComboBox>
<ribbon:RibbonComboBox x:Name="FiltreEtatType" Label="Type" Grid.Column="1" Grid.Row="1">
<ribbon:RibbonGallery Name="GallEtatType">
<ribbon:RibbonGalleryCategory Name="GalEtatType" ItemsSource="{Binding}"/>
</ribbon:RibbonGallery>
</ribbon:RibbonComboBox>
我尝试了这段代码,但显示的文字没有改变
FiltreEtatType.Text = "";
GallEtatType.SelectedItem = null;
我该怎么办?