How can we improve the Windows Phone dev platform?

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.

681 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Mark MonsterMark Monster shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Fabio SalvalaiFabio Salvalai shared a merged idea: Make Application Bar support Commanding  ·   · 

    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

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • EugeniyEugeniy commented  ·   ·  Flag as inappropriate

        you can always write your own application bar
        Or you can write ApplicationBar wrapper, which will support binding and so on...

      • xaeryanxaeryan commented  ·   ·  Flag as inappropriate

        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 SzalayRichard Szalay commented  ·   ·  Flag as inappropriate

        @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 WonePeter Wone commented  ·   ·  Flag as inappropriate

        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.

      • kkarmankkarman commented  ·   ·  Flag as inappropriate

        this suggestion was already mentioned. please remove it and vote for the other.

      • kkarmankkarman commented  ·   ·  Flag as inappropriate

        Also, I would like to have animations for the applicationbar as in the native e-mail client

      Feedback and Knowledge Base