Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Unable to get large ribbon buttons
posted

I have the following XAML structure:

<igRibbon:RibbonTabItem x:Name="ModuleLauncherTab"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igRibbon="clr-namespace:Infragistics.Windows.Ribbon;assembly=InfragisticsWPF3.Ribbon.v10.3"

Header="Launcher">
<ItemsControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igRibbon="clr-namespace:Infragistics.Windows.Ribbon;assembly=InfragisticsWPF3.Ribbon.v10.3">
<ItemsControl.ItemsPanel>

<ItemsPanelTemplate>
<igRibbon:ToolHorizontalWrapPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>

<igRibbon:ButtonTool Caption="{Binding Name}"
Command="{Binding Launch}"
ToolTip="{Binding Description}"
LargeImage="{Binding Image}"
igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"

igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</igRibbon:RibbonTabItem>

At run time button tools are added to the ItemsControl depending on the bound collection.

No matter what I try, the added buttons use small images (autoresized from 32x32) and caption on the right. How can I force the dynamically added ButtonTool instances to display large images and caption underneath instead?

P.S. Seeing as your forum is completely unsuitable for code snippet display, here is the code: https://gist.github.com/852699