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 dlaa.me.

See you there!

Comments

  • Anonymous
    November 10, 2010
    Yayyyyy !!! Sweet !!! Thank you for this. Will definitely be helpful in nearby future for us WP7 devs.

  • Anonymous
    November 10, 2010
    Wonderful!! Really solved a big gap between WPF and SL Thanks for this :)

  • Anonymous
    December 08, 2010
    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? Thanks.

  • Anonymous
    December 09, 2010
    Koko, Yes, this should help with that. :)

  • Anonymous
    October 04, 2013
    I try to  binding Canvas.Top,but it doesn't work.

  • Anonymous
    October 05, 2013
    Andy Zhao, Canvas.Top is only respected in a Canvas container - might your control have been in a different Panel?

  • Anonymous
    January 24, 2014
    I'm trying to use this with a RelativeSource to set the FontSize on a TextBlock, like so:                    <Setter Property="local:SetterValueBindingHelper.PropertyBinding">                        <Setter.Value>                            <local:SetterValueBindingHelper                                Property="FontSize"                                Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=NormalFontSize}"/>                        </Setter.Value>                    </Setter> It doesn't seem to be working. Wondering if the value of Self is getting lost or misdirected?

  • Anonymous
    January 25, 2014
    Ben Rockwell, RelativeSource uses the element itself as the source of the binding: msdn.microsoft.com/.../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. :)