DataTrigger in ControlTemplate not setting Image source

前端 未结 2 1984
悲哀的现实
悲哀的现实 2021-01-28 10:34

I have a ControlTemplate that i defined for showing a View model in my required format. However, I am not able to set the Image\'s source property from the DataTrigger of the Co

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-28 11:02

    By looking at the following link http://social.msdn.microsoft.com/Forums/vstudio/en-US/a3bf91a8-e618-41c6-a1ad-be9e19581fd6/datatrigger-inside-controltemplate-issue

    It became clear that i should not use TemplatedParent. Setting the {RelativeSource Self} in the binding solved the problem.

            
                
                    
                
            
    

提交回复
热议问题