Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:37:19+00:00 2026-06-17T04:37:19+00:00

How can I bind EventToCommand programmatically to an ApplicationBar Button or MenuItem in Windows

  • 0

How can I bind EventToCommand programmatically to an ApplicationBar Button or MenuItem in Windows Phone 8? I’m currently using MVVM light and it works perfectly for all elements I can add in XAML.

Normally, I would define the ApplicationBar from Xaml and could bind from there EventToCommand in Expression Blend. But starting with WP8, Microsoft deciced to prefer an localizable ApplicationBar which will be created programmatically, as it cannot be bind that easily to different languages.

What is necessary to reproduce the same behaviour as if I would push a Button to execute EventToCommand? Is this even possible or encouraged regarding the MVVM pattern? What are my alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:37:20+00:00Added an answer on June 17, 2026 at 4:37 am

    You can use the same old WP7 AppBar in WP8. LocalizableAppBar is just a recommendation on how to localize the AppBar.

    Either way, you’re likely weren’t using EventToCommand on the AppBar since it doesn’t support DataBinding. You’ll need to use a Bindable AppBar for that. Either write a homegrown one or use one of the many OSS solutions for that, such as: AppBarUtils, BindableApplicationBar, Cimbalino or others.

    Localizing one of the aforementioned ApBars will be a lot simpler since you can then databind the text to the ViewModel and use whatever text you’d like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've data bound a ListBox in my MVVM Light Windows Phone 7 app, and
I am currently trying to figure out how you can bind multiple fields in
In PHP, how can you bind using a property other than the default cn?
One can bind Javascript events to html elements without using inline declarations. Is there
I'm using this control Here to be able to host Table that can bind
I can bind eventsin the current window, but I'm using TinyMCE which creates an
I can bind a inner object property to gridview using the following setup at
I'm using a map from Esri, which offers a feature where you can bind
I have ComboBox inside StackPanel. I am using MVVM and try to bind 'GotFocus'
I'm using a PasswordBox which exposes a dependency property such that I can bind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.