Posted 16 years ago
by John Kelly

Hi,
I've bound a gallery to an item source but i'm unable to figure out how to set the PopupGallery.Category property on an external source (i.e. a collection of simple data transfer objects). I've tried setting it on the button but this doesn't work as i suspect it needs to be set on the DTO itself.
I've looked at your examples and tried any which way but loose but to no avail. Any ideas?
Here's a rough example of what i'd like to happen..Thanks in advanced
JK
I've bound a gallery to an item source but i'm unable to figure out how to set the PopupGallery.Category property on an external source (i.e. a collection of simple data transfer objects). I've tried setting it on the button but this doesn't work as i suspect it needs to be set on the DTO itself.
I've looked at your examples and tried any which way but loose but to no avail. Any ideas?
Here's a rough example of what i'd like to happen..
<ribbon:PopupGallery InitialColumnCount="4" CanFilter="True" IsSelectionHighlightVisible="False" >
<ribbon:PopupGallery.CategorizedItemsSource>
<MultiBinding Converter="{StaticResource ObjectInstancesConverter}">
<Binding Path="Collection1"></Binding>
<Binding Path="Collection2"></Binding>
</MultiBinding>
</ribbon:PopupGallery.CategorizedItemsSource>
<ribbon:PopupGallery.ItemTemplate>
<DataTemplate>
<ribbon:SplitButton ribbon:PopupGallery.Category="{Binding Path=A_Enum_Val}"
ImageSourceLarge="{DynamicResource MyImage}" Label="{Binding Path=Name}" VariantSize="Large" />
</DataTemplate>
</ribbon:PopupGallery.ItemTemplate>
</ribbon:PopupGallery>
JK