With some help from Shawn Oster – I had the BindableApplicationBar published on NuGet. Now there is no need to search for sources or assemblies on CodePlex if you need to quickly create an MVVM-friendly ApplicationBar. Just right-click on your project and select “Manage NuGet Packages…”
Then search for appbar, install it and voila! You can now use the BindableApplicationBar.
Refresher on using the BindableApplicationBar
Add an xml namespace declaration in your page element:
<phone:PhoneApplicationPage x:Class="PhoneApp2.MainPage" xmlns:bar="clr-namespace:BindableApplicationBar;assembly=BindableApplicationBar"
…then put something like this inside of your page XML element for an application bar with one command-bound icon button and one menu item:
<bar:Bindable.ApplicationBar> <bar:BindableApplicationBar> <bar:BindableApplicationBarButton IconUri="/Icons/Dark/appbar.add.rest.png" Text="{Binding IconButtonText}" Command="{Binding TestCommand}" /> <bar:BindableApplicationBar.MenuItems> <bar:BindableApplicationBarMenuItem Text="Menu Item 1" Command="{Binding TestCommand}" /> </bar:BindableApplicationBar.MenuItems> </bar:BindableApplicationBar> </bar:Bindable.ApplicationBar>
Posts regarding Bindable ApplicationBar
- The quest for a Bindable ApplicationBar – Part 1
- The quest for a Bindable ApplicationBar – Part 2
- The quest for a Bindable ApplicationBar – Part 3
- BindableApplicationBar RC1 + Windows Phone Prism Application Template
- BindableApplicationBar for Windows Phone – Now On NuGet
[…] BindableApplicationBar for Windows Phone – Now On NuGet […]
[…] Pingback: BindableApplicationBar for Windows Phone – Now On NuGet | Xyzzer's Dev Blog […]
[…] Pingback: BindableApplicationBar for Windows Phone – Now On NuGet | Xyzzer's Dev Blog […]
Awesome! Got it working with MVVM Light. Great work, thank you.
Glad to hear that! 🙂