Microsoft のRibbonControlLibrary
. シンプルな WPF アプリケーションRibbonControlLibrary
を作成し、その上にリボン バーを作成するために使用しています。問題は下の画像に示されています。
問題は、「何か」の下のメニューが、左側のメニューにある項目 (Item1、Item2) と同じくらいしか展開されないことです...左側のメニューの項目を増やすと、これが得られます
しかし、何かの下のメニューに欠落しているシルアイテムがあります。
以下は私が使用しているXAMLです
<Ribbon:Ribbon ItemsSource="{Binding Path=CSIMRibbonTabs}">
<Ribbon:Ribbon.ApplicationMenu>
<Ribbon:RibbonApplicationMenu CanUserResizeVertically="True" ItemsSource="{Binding Path=MainItem}">
<Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border >
<StackPanel Orientation="Vertical">
<Label Content="Something" />
</StackPanel>
</Border>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Path=OtherItems}"/>
</Grid>
</Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
</Ribbon:RibbonApplicationMenu>
</Ribbon:Ribbon.ApplicationMenu>
</Ribbon:Ribbon>
コード
public List<string> MainItem
{
get
{
return new List<string>() { "Item1", "Item2", "Item3"};
}
}
public List<string> OtherItems
{
get
{
return new List<string>() { "val1", "val2", "val3", "val4", "val5", "val6", "val7", "val8" };
}
}
リストに項目がある分、「何か」の下にメニューを展開するにはどうすればよいですか?