locked
AppBar: no commandTap (or similar) event? RRS feed

  • Question

  • Hello guys.

    quick question: why don't we have a commandTap or commandInvoked event which should be fired when someone clicks or taps over a command? Do I need to pass the same handler to all the appbarcommand items? 

    thanks


    Luis Abreu

    Friday, March 9, 2012 11:49 AM

Answers

  • Luis,

    AppBar is nothing special.  There is no 'appbar click event' for example.  You need to handle events for the items contained in this just like any other html in your project.  And yes, you could use the same handler if you want, you would need to test for who send the click.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, March 9, 2012 12:10 PM
    Moderator

All replies

  • Luis,

    AppBar is nothing special.  There is no 'appbar click event' for example.  You need to handle events for the items contained in this just like any other html in your project.  And yes, you could use the same handler if you want, you would need to test for who send the click.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, March 9, 2012 12:10 PM
    Moderator
  • Yes, I understand what you're saying, but I'm not sure if I agree with the "AppBar is nothing special" part. What I'm saying is that if you're "forcing" a model where you can *only* use commands, then I expect to be able to hook up an event in the appbar when someone clicks on one of those commands. Sure, the code isn't hard: you can check for the click event on the bar and then see if the evt.target is a command or not. But shouldn't it be there already? Just asking ;)

    Luis Abreu

    Saturday, March 10, 2012 11:30 AM