15 responses

  1. enloes
    January 24, 2012

    Based on some of the recent comments I tried this out using the Button Command property.
    First remove the EventToCommand behavior (assuming you’ve gone through all the steps above).
    Select Page2Button. Under Miscellaneous, select the “peg” next to Command, select DataBinding and then select the Page2Command as before.
    Works the same. Is this the recommend way of messaging with 7.1?

  2. Gustavo
    January 14, 2012

    After doing everything up to GoToPage2(), when I save & Build and go back to Blend, I can’t touch the command property under miscellaneous

    • enloes
      January 24, 2012

      Make sure you click the little “peg” NEXT to the command property box

  3. Frank Wu
    November 2, 2011

    It’s way too much code when using MVVM Light comparing to using Prism. Command is at most one line of code with Prism. The “Light” means the template is light, and makes the code heavier.

  4. Dave T
    October 12, 2011

    Actually that does seem to me like a valid question. The Command property is supported on Button both in Silverlight 4 and Windows Phone 7.1.


    • Anonymous
      June 8, 2012

      But command cannot distinguish click and mouseover

  5. Chris Andritzky
    May 26, 2011

    Now I got it: It’s because in Silverlight there is no Button.Command property. It’s only available in WPF.

    • Rod Falanga
      December 8, 2011

      Chris, if I’m understanding you correctly, you’re saying that if one were using WPF, all they’d have to do is something like this:

      am I correct?

    • Rod Falanga
      December 8, 2011

      Chris, et. al, I’ve got another question concerning the Command property. I’ve checked and found that with the release of Silverlight 4, it supports the Command property on the ButtonBase class (from Tim Heuer’s blog). So then, I’m kind of confused as to what the need is to go through connecting a command using behaviors. Why not just use the Command property of the button class?

  6. Chris Andritzky
    May 26, 2011

    I don’t see why we need the EventToCommand behavior here. Why not just simply bind the Button.Command property to Page2Command? This would also ensure that the button gets disabled when the command’s CanExecuteChanged method returns false.

    I see that this is only an example, but it might be better to use an event for which there is no corresponding Command property (like ComboBox. SelectionChanged).

  7. Kris Athi
    January 6, 2011

    If you are having trouble seeing the behaviours, double check you have installed all the toolkit bits correctly – there is a link to it in part 1.

    Great job Jesse, Great series so far :)

  8. Anonymous
    January 6, 2011

    ohh.. i need to install lvvmlight to see that i think.. I just tried opening the project

  9. Anonymous
    January 6, 2011

    I don’t see a ‘eventtocommand’ behaviour in my blend 4.. everyone else sees this?

  10. Shoaib Shaikh
    January 6, 2011

    great series of post. keep it up!

Leave a Reply




Back to top
mobile desktop