Telerik WPF RibbonBar通过数据绑定填充
我有一个和对象模型,一个UserProfile,它包含许多ServiceProfile,每个ServiceProfile都包含许多CommandProfile。 我已将此模型与Telerik WPF OutlookBar绑定:Telerik WPF RibbonBar通过数据绑定填充,wpf,data-binding,telerik,ribbon,recursive-databinding,Wpf,Data Binding,Telerik,Ribbon,Recursive Databinding,我有一个和对象模型,一个UserProfile,它包含许多ServiceProfile,每个ServiceProfile都包含许多CommandProfile。 我已将此模型与Telerik WPF OutlookBar绑定: <telerikNavigation:RadOutlookBar ItemsSource="{Binding ServiceProfiles}"
<telerikNavigation:RadOutlookBar
ItemsSource="{Binding ServiceProfiles}"
Background="{Binding Color}">
<telerikNavigation:RadOutlookBar.TitleTemplate>
<DataTemplate>
<Label Content="{Binding Description}"/>
</DataTemplate>
</telerikNavigation:RadOutlookBar.TitleTemplate>
<telerikNavigation:RadOutlookBar.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Description}"/>
</DataTemplate>
</telerikNavigation:RadOutlookBar.ItemTemplate>
<telerikNavigation:RadOutlookBar.ContentTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding CommandProfiles}" Background="Transparent">
<ListBox.ItemTemplate>
<DataTemplate>
<Button
Content="{Binding Description}"
Command="{Binding ExecuteCommand}"
/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</telerikNavigation:RadOutlookBar.ContentTemplate>
</telerikNavigation:RadOutlookBar>
有点晚了,但很抱歉,它看起来还不受支持: 你好,范先生, 不幸的是,RibbonBar目前不支持数据绑定。但是,您可以在我们的PIT中投票支持此功能,从而提高其优先级。 在您的情况下,最好是以编程方式添加功能区项。 如果您需要更多信息,请告诉我们。 祝你一切顺利, 蒂娜·斯坦切娃 Telerik团队
<telerikRibbonBar:RadRibbonTab
x:Name="theTab"
Header="{Binding Description}"
Background="{Binding Color}"
ItemsSource="{Binding ServiceProfiles}">
</telerikRibbonBar:RadRibbonTab>
Marco Parenzan