Hello!
I am confused with appearance of category headers in PopupGallery. When items collection is explicitly defined in XAML with ‘ribbon:PopupGallery.Category’ property on each item, the category headers are shown. When I bind CategorizedItemsSource to an observable collection which contains data objects (inherited from DependencyObject), the category header are missed, despite of that I set the attached Category property in object’s constructor, e.g.:
this.SetValue(PopupGallery.CategoryProperty,”GroupA”);
I also tried approach with binding the PopupGallery to a delegate property with:
ItemCategoryDelegate="{Binding MyItemCategoryDelegate,RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type Window}}}"
Again, when CategorizedItemsSource is set to a XAML list, my static delegate method is called normally. When I change binding to the observable collection, the method is not called at all (it does not hit a breakpoint) and categories are ignored.
Can you provide an example how to make up categories with binding to an observable collection?
Thank you in advance!
Ilia
[Modified 12 years ago]