RadComboBox如何更改选定项的外观?

时间:2019-01-07 15:30:36

标签: c# wpf xaml combobox telerik

我必须为RadComboBox中的选定项目提供排序(升序,降序,无)。

我当时想使选定的项目看起来如下:项目的左侧是文本,右侧是图标(箭头)显示排序方向。文本和图标由垂直线分隔。单击该项目可更改排序方向(无→升序→降序→无)。

我目前所拥有的如下: enter image description here

这就是我希望所选项目的外观(字段例如是LanguageName): enter image description here

我的问题是如何定义RadComboBox的选定项目?我必须更改哪个模板以及如何更改?

这是我的源代码:

 <telerik:RadComboBox ItemsSource="{Binding Customization.Columns}"
                                      DisplayMemberPath="Title"
                                      AllowMultipleSelection="True"
                                      CanAutocompleteSelectItems="True"
                                      CanKeyboardNavigationSelectItems="True"
                                      SelectionChanged="GroupingRadComboBox_OnSelectionChanged"
                                      SelectedItem="{Binding GroupByColumn, Mode=TwoWay}">
                                <telerik:RadComboBox.IsEnabled>
                                    <MultiBinding Converter="{StaticResource BooleanAndConverter}">
                                        <Binding Path="Customization.Wpf.LoadInMemory"/>
                                        <Binding Path="Customization.Columns.Count" Converter="{StaticResource IsCollectionEmptyToBoolConverter}" />
                                    </MultiBinding>
                              </telerik:RadComboBox.IsEnabled
 </telerik:RadComboBox>

1 个答案:

答案 0 :(得分:0)

我从未使用telerik,但可能像默认的ComboBox一样,可以使用SelectionBoxItemTemplate属性设置数据模板。

相关问题