Telerik WPF RibbonBar заполняется через DataBinding

У меня есть объектная модель, UserProfile, которая содержит много ServiceProfile, каждый из которых содержит много CommandProfile. Я связал эту модель с Telerik WPF OutlookBar:

<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>

Этот код XAML создает OutlookbarItem для каждого ServiceProfile. Каждый OutlookbarItem представляет собой список кнопок в качестве содержимого.

Я не могу выполнить аналогичную работу с ленточным баром: внутри одной вкладки (со ссылкой на мой пользовательский профиль) я хочу создать RibbonGroup для каждого служебного профиля. Внутри каждой группы (профиля службы) есть много кнопок ленты, по одной для каждого профиля команды. Но я не могу.

Я прихожу к этому коду:

 <telerikRibbonBar:RadRibbonTab 
                x:Name="theTab"
                Header="{Binding Description}" 
                Background="{Binding Color}"
                ItemsSource="{Binding ServiceProfiles}">

            </telerikRibbonBar:RadRibbonTab>

который создает группы лент, но я ничего не могу контролировать (название группы, заполнять (через привязку) содержимое.

Есть идеи?

Спасибо

Marco Parenzan

person Marco Parenzan    schedule 10.03.2010    source источник


Ответы (1)


Немного поздно, но извините, но он еще не поддерживается:

http://www.telerik.com/community/forums/silverlight/ribbonbar/headertemplate-of-radribbontab.aspx

Hello Alex Fan, Unfortunately the RibbonBar doesn't support databinding for now. However, you can put your vote for this feature in our PITS thus increasing its priority. In your case the best will be if you add the ribbon items programmatically. Let us know if you need more info. All the best, Tina Stancheva the Telerik team
person Sarkie    schedule 25.06.2010