Image.Height TemplateBinding does not work

前端 未结 1 1089
情歌与酒
情歌与酒 2021-01-24 20:35

I have created a CustomControl implemented from Button class in WPF.

public class ImageButton : Button
{
      ...

       public int ImageHeight
       {
               


        
相关标签:
1条回答
  • 2021-01-24 20:58

    Did you try using {Binding RelativeSource={RelativeSource TemplatedParent}, Path=Progress} instead ?

    See these answers for more details...

    WPF TemplateBinding vs RelativeSource TemplatedParent

    Binding custom dependency property to custom WPF style

    hope this helps

    0 讨论(0)
提交回复
热议问题