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
435
Min button size in RibbonGroup using an ItemsControl
posted

I'm generating buttons for a RibbonGroup from a backing collection, and am having a couple of issues.  I've pasted the code below.

First, the size of the buttons is always reverting to small.  I instead want to display the Large 32x32 image and text.  Attached is an image showing how it currently renders with 5 buttons.

Secondly, I'd like to bind the LargeImage property to a value in my viewmodel, just as I'm doing for the Caption and IsChecked.  How can I do that - I've tried a few things but it seems it's not straightforward.

Thanks in advance.

<igRibbon:RibbonGroup Caption="Current Environment">
 <ItemsControl ItemsSource="{Binding Environments}">
 <ItemsControl.ItemsPanel>
 <ItemsPanelTemplate>
 <StackPanel Orientation="Horizontal" />
 </ItemsPanelTemplate>
 </ItemsControl.ItemsPanel>
 <ItemsControl.ItemTemplate>
 <DataTemplate>
 <igRibbon:RadioButtonTool Caption="{Binding Label}"
													  IsChecked="{Binding IsSelected}"
													  igRibbon:RibbonGroup.MinimumSize="ImageAndTextLarge"
													  LargeImage="/Resources;component/Images/Icons/32x32/gear.png" />
 
 </DataTemplate>
 </ItemsControl.ItemTemplate>
 </ItemsControl>
 </igRibbon:RibbonGroup>