BarGalleryItemTemplateSelector.PrefersMenuItemAppearance protected or public

Bars for WPF Forum

The latest build of this product (v24.1.2) was released 2 months ago, which was before this thread was created.
Posted 1 month ago by Bjørnar Sundsbø - Norway
Avatar

I suggest making the method BarGalleryItemTemplateSelector.PrefersMenuItemAppearance public or protected so it can be reused from custom Gallery item template selectors


Bjørnar Sundsbø

Comments (4)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The intention is for you to set BarMenuGallery.UseMenuItemAppearance to true when your gallery should use menu item appearance.  Or specific gallery item view models can set IBarGalleryItemViewModel.LayoutBehavior == BarGalleryItemLayoutBehavior.MenuItem if only specific items should have menu item appearance.

Is there some scenario you have where either of those options won't work?


Actipro Software Support

Posted 1 month ago by Bjørnar Sundsbø - Norway
Avatar

Sorry. I didn't see email notification.

I have a custom DataTemplate selector class deriving from  BarGalleryItemTemplateSelector, and want to extend similar gallery vs menuitem behavior for my own gallery items. I duplicated the code from BarGalleryItemTemplateSelector.PrefersMenuItemAppearace, but if they were public/protected, I could reuse those from my custom selector.

[Modified 1 month ago]


Bjørnar Sundsbø

Answer - Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thanks for the explanation.  We will make the BarGalleryItemTemplateSelector.PrefersMenuItemAppearance method protected virtual for the next build.


Actipro Software Support

Posted 1 month ago by Bjørnar Sundsbø - Norway
Avatar

Great. Thanks. I would have created a PR, but pressure is high at the moment.


Bjørnar Sundsbø

Add Comment

Please log in to a validated account to post comments.