The taming of the phone [New SetterValueBindingHelper sample demonstrates its usefulness on Windows Phone 7 (and Silverlight 4)]

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of

See you there!

Comments (8)
  1. KRK says:

    Yayyyyy !!! Sweet !!!

    Thank you for this. Will definitely be helpful in nearby future for us WP7 devs.

  2. Jobi says:

    Wonderful!! Really solved a big gap between WPF and SL Thanks for this 🙂

  3. Koko says:

    Hello, sorry my english is not so good. I have a Listbox where I want to bind the style of a item to my viewmodel. Do I understand correctly that this will make it possible?


  4. David Anson says:


    Yes, this should help with that. 🙂

  5. Andy Zhao says:

    I try to  binding Canvas.Top,but it doesn't work.

  6. David Anson says:

    Andy Zhao,

    Canvas.Top is only respected in a Canvas container – might your control have been in a different Panel?

  7. Ben Rockwell says:

    I'm trying to use this with a RelativeSource to set the FontSize on a TextBlock, like so:

                       <Setter Property="local:SetterValueBindingHelper.PropertyBinding">




                                   Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=NormalFontSize}"/>



    It doesn't seem to be working. Wondering if the value of Self is getting lost or misdirected?

  8. David Anson says:

    Ben Rockwell,

    RelativeSource uses the element itself as the source of the binding:…/dd553635(v=vs.95).aspx

    At best, I think that would be the TextBlock which doesn't have a NormalFontSize property if memory serves. But with SetterValueBindingHelper in play, I'm not sure what the source would be. My guess is that you don't need to use RelativeSource in this scenario and will have an easier time if you can get rid of it. 🙂

Comments are closed.

Skip to main content