RelativeSource and Popup

前端 未结 4 1991
萌比男神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:34

    Popups are not part of the visual tree.

    Relative Source "Gets or sets the binding source by specifying its location relative to the position of the binding target (MSDN)". Since Popups are not part of the visual tree of the control that is showing it, it will not be able to resolve anything outside of the popup.

提交回复
热议问题