Windowscommunitytoolkit: Add HamburgerMenuItem.IsEnabled support

Created on 13 Feb 2017  路  7Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

We need an easy (and bindable) way to disable and hide hamburger menu items. I can create a PR later this week if you want.

controls question

All 7 comments

Hello,
the menu items are in a list. So you can provide an obersablecollection and add/remove items dynamically

It's a little bit odd to create a collection of dependency objects in the ViewModel, and the disabled state is still not supported.

How are you doing it today on a regular gridview?

Ohh I see, the menu items are in a ListView so we need to use custom ItemTemplate. #816 is also ralated because the HamburgerMenu doesn't have default ItemTemplate it's kind of boilerplate.

Notice that since 1.3, you can use ItemTemplateSelector to use a different ItemTemplate based on the value of your Items.

By the way, I am 100% ok to support the IsEnabled property for HamburgerMenu items.
About the Visibility property, like @deltakosh said, I assume you can handle your Items collection with an ObservableCollection.

Closing this one then.

Was this page helpful?
0 / 5 - 0 ratings