WPF ControlTemplate and Binding

Posted by Vinjamuri on Stack Overflow See other posts from Stack Overflow or by Vinjamuri
Published on 2010-03-27T20:29:37Z Indexed on 2010/03/27 20:33 UTC
Read the original article Hit count: 224

Filed under:

In the below code, MousePressImage is a dependency property of class ButtonControl. The following Binding doesn't work.. Appreciate your help in solving this issue..

                      Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                                Path=MousePressImage}"/>

-->

I create the ButtonControl like this.

    <local:ButtonControl Height="48" Width="160" MouseOverImage="pack://application:,,,/Recipe_06_13;component/Resources/Over.bmp" MousePressImage="pack://application:,,,/Recipe_06_13;component/Resources/Press.bmp" DisableImage=" ">

    </local:ButtonControl>

© Stack Overflow or respective owner

Related posts about wpf