2010-03-10 66 views
0

我有和對象模型中,用戶配置,包含許多ServiceProfile,每個包含許多CommandProfile填充。 我已綁定這種模式與Telerik的WPF OutlookBar:Telerik的WPF RibbonBar通過數據綁定

<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代碼創建的每個ServiceProfile一個OutlookbarItem。每個OutlookbarItem都提供一個按鈕列表作爲內容。

我不能與ribbonBar做類似的工作:一個標籤內(指我的用戶配置),我要爲每一個ServiceProfile一個RibbonGroup。在每個組(服務配置文件)內部都有許多Ribbon按鈕,每個CommandProfile都有一個按鈕。 但我不能。

我到達這個代碼:

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

      </telerikRibbonBar:RadRibbonTab> 

它創建ribbongroups,但我不能夠控制組的任何東西(頭銜,補(通過綁定)內容

所有。主意?

感謝

Marco Parenzan 

回答

0

有點晚了,但遺憾地說,但它沒有LO OK尚不支持:

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

你好亞歷克斯風扇, 不幸的是,RibbonBar不支持綁定現在。但是,您可以在PITS中爲此功能投票,從而提高其優先級。如果添加帶項目編程 在你的情況最好會。 讓我們知道,如果你需要更多的信息。 一切順利, Tina Stancheva Telerik團隊