Hi,
I have a simple gallery in my ribbon, much like the one in your sample application:Since I am using mediaImaging:BitmapImage for this gallery how do I bind it to do something? It doesn't function like a normal ribbon button and have a command option. I have looked at your sample application, but none of your mediaImaging:BitmapImage gallery items actually bind and do something.
Please give advice how to bind.
Many thanks
[Modified at 11/22/2011 04:01 AM]
I have a simple gallery in my ribbon, much like the one in your sample application:
<ribbon:RibbonGallery Name="gallery" MediumVariantColumnCount="4" ImageSourceLarge="/Images/Ribbon/Actions32.png" IsSelectionHighlightVisible="True" Label="Form Layout" ScreenTipDescription="Manage Items">
<ribbon:RibbonGallery.ItemsSource>
<x:Array Type="{x:Type mediaImaging:BitmapImage}">
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="Add New Item" x:Name="Add" UriSource="/Images/Ribbon/Add.png"/>
<mediaImaging:BitmapImage ribbon:ScreenTipService.ScreenTipHeader="Delete Item" x:Name="Delete" UriSource="/Images/Ribbon/Delete.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="True" 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>
Please give advice how to bind.
Many thanks
[Modified at 11/22/2011 04:01 AM]