0

私はオブジェクト モデル、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 コードは、ServiceProfile ごとに OutlookbarItem を作成します。各 OutlookbarItem は、ボタンのリストをコンテンツとして表示します。

単一のタブ (UserProfile を参照) 内で、ServiceProfile ごとに RibbonGroup を作成したいと考えています。各グループ (サービス プロファイル) 内には、CommandProfile ごとに 1 つずつ、多数のリボン ボタンがあります。しかし、私はできません。

このコードにたどり着きました:

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

            </telerikRibbonBar:RadRibbonTab>

これによりリボングループが作成されますが、何も制御できません (グループのタイトル、(バインディングによる) コンテンツの入力)。

何か案が?

ありがとう

Marco Parenzan
4

1 に答える 1

0

少し遅れましたが、申し訳ありませんが、まだサポートされていないようです:

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

Hello Alex Fan 残念ながら、現在、RibbonBar はデータバインディングをサポートしていません。ただし、PITS でこの機能に投票して、優先度を上げることができます。あなたの場合、プログラムでリボン項目を追加するのが最善です。さらに情報が必要な場合はお知らせください。テレリック チームの Tina Stancheva さん、よろしくお願いいたします。
于 2010-06-25T11:15:53.940 に答える