DataTrigger in ControlTemplate not setting Image source

前端 未结 2 1956
悲哀的现实
悲哀的现实 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 10:51

    fine , wierd contorl design ...

        
                
         
    

    since you are using a DataTrigger from an item's precpective , the DataTemplates DataContext is an object from your ItemsSource , RelativeSource to the containing control , Path to it's DataContext.Property

提交回复
热议问题