
Hi,
I have a simple bitmap image gallery consisting of 4 images. I would like to have 4 columns set as default, resulting in all 4 images being displayed by default. Then other images/options may be added to this gallery in the future, but for now it is just 4 images.I have set the variant size to large, and set both the medium and large column counts to above 4 but this just doesn't work. It still displays the default 3 columns. I have changed the variant behavior to all 4 options (default, noautosize etc), but it still doesn't work.
This gallery is the only item in this group and tab, so it has plenty of space to grow.
Am I doing something obviously wrong?
I have a simple bitmap image gallery consisting of 4 images. I would like to have 4 columns set as default, resulting in all 4 images being displayed by default. Then other images/options may be added to this gallery in the future, but for now it is just 4 images.
<ribbon:RibbonGallery Name="gallery" LargeVariantColumnCount="12"
MediumVariantColumnCount="6" VariantSize="Large"
VariantBehavior="NoAutoSize" ImageSourceLarge="/Images/Ribbon/FormLayout32.png" IsSelectionHighlightVisible="False" Label="Form Layout">
<ribbon:RibbonGallery.ItemsSource>
<x:Array Type="{x:Type mediaImaging:BitmapImage}">
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="Two column layout" x:Name="Gallery2Column" UriSource="/Images/Ribbon/Layout/GalleryLayout2Column.png"/>
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="Two column layout with labels stacked above the input fields" x:Name="Gallery2ColumnStacked" UriSource="/Images/Ribbon/Layout/GalleryLayout2ColumnStacked.png"/>
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="4 column layout" x:Name="Gallery4Column" UriSource="/Images/Ribbon/Layout/GalleryLayout4Column.png"/>
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="1 column layout with labels stacked above the input fields" x:Name="Gallery1ColumnStacked" UriSource="/Images/Ribbon/Layout/GalleryLayout1ColumnStacked.png"/>
</x:Array>
</ribbon:RibbonGallery.ItemsSource>
<ribbon:RibbonGallery.ItemTemplate>
<DataTemplate>
<Image Margin="2" Source="{Binding BindsDirectlyToSource=True}" Stretch="None"/>
</DataTemplate>
</ribbon:RibbonGallery.ItemTemplate>
<ribbon:RibbonGallery.PopupContent>
<StackPanel>
<ribbon:PopupGallery InitialColumnCount="4" IsSelectionHighlightVisible="False"
ItemTemplate="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ribbon:RibbonGallery}}, Path=ItemTemplate}"
ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ribbon:RibbonGallery}}, Path=ItemsSource}" />
</StackPanel>
</ribbon:RibbonGallery.PopupContent>
</ribbon:RibbonGallery>
This gallery is the only item in this group and tab, so it has plenty of space to grow.
Am I doing something obviously wrong?