RelativeSource and Popup

前端 未结 4 1990
萌比男神i
萌比男神i 2020-12-10 16:19

The problem is that RelativeSource does not work in the following case. I use silverlight 5.

//From MainPage.xaml


        
4条回答
  •  盖世英雄少女心
    2020-12-10 16:49

    As others have mentioned, it's because the Popup is not part of the visual tree. Instead, you can use the Popup's PlacementTarget property to get back to the visual tree:

    
        
            
        
    
    

提交回复
热议问题