Is it possible to bind a command directly to an app bar button?

windows-phone-8

Solution

It's not possible from the SDK directly, but the AppBarUtils library ( http://nuget.org/packages/AppBarUtils or http://appbarutils.codeplex.com/ ) works nicely.

The codeplex site has example code for different scenarios such as reusing or switching the app bar in a page.

Problem

I'm creating an MVVM style application for windows phone. With a regular button, you can bind anything that inherits from ICommand to the Command property on a xaml button, like so: The command property does not seem to exist for buttons in the phones app bar ("shell:ApplicationBarIconButton"). Has anyone figured out how to bind their click event to a Command yet?

Original source