Enable Databindable ApplicationBar (buttons and menuitems)
Right now it's not easy to enable DataBinding on the ApplicationBar buttons and menuitems.
- When created in Xaml there's no way to get a reference to them, should be different.
- Should be easily bound to a command, same as for icon and text should be bindable.
Thank you for the suggestion and commentary. While we are not adding this capability in the 8.0 release, there are currently a variety of community projects out there (see the comments for some suggestions). Please know that this is also definitely on the consideration list for future Windows Phone releases.
Keep those suggestions and votes coming!
10 comments
-
Daniel Vaughan
commented
Calcium SDK has a pretty useful bindable Application Bar wrapper. I use that for all my apps. http://calciumsdk.com
-
Eugeniy
commented
you can always write your own application bar
Or you can write ApplicationBar wrapper, which will support binding and so on... -
Sudarsan Srinivasan
commented
A must thing for a dev who is used to writing MVVM pattern based code.
-
Pedro Lamas commented
Please check my Cimbalino Windows Phone Toolkit for a bindable ApplicationBar behavior! ;)
-
Valentin Stoychev commented
This is a also a BIG problem when you want to localize the buttons.
-
xaeryan
commented
Lack of Commanding for ApplicationBar is a major annoyance for me, resulting in some less than ideal workarounds for updating Enabled status of these controls.
-
Richard Szalay
commented
@Peter - Mark is likely referring to MVVM. As ApplicationBar buttons/icons are not DependencyObjects, they cannot be bound to. This requires adding code to the code behind, which can't be tested.
-
Peter Wone
commented
No way to get a reference? Bollocks. Declare a page member.
ApplicationBarIconButton appbar_buttonAddToFavourites;
Then set it in OnNavigatedTo.
appbar_buttonAddToFavourites = ApplicationBar.Buttons[0] as ApplicationBarIconButton;
The buttons are indexed 0..3 in the order they are declared in XAML.
-
kkarman
commented
this suggestion was already mentioned. please remove it and vote for the other.
-
kkarman
commented
Also, I would like to have animations for the applicationbar as in the native e-mail client
