开发者

How do I check for when my control obtains or changes the visual parent?

开发者 https://www.devze.com 2022-12-19 18:33 出处:网络
开发者_C百科I want to hook my control\'s visual parent\'s events.You can override the OnVisualParentChanged() method to be notified when ever your visual parent changes.

开发者_C百科I want to hook my control's visual parent's events.


You can override the OnVisualParentChanged() method to be notified when ever your visual parent changes.

Note that it is almost always a bad idea to actually use this: In 99% of cases the data template should take care of hooking up related controls by setting their properties, or it is better handled with attached inherited properties. But for the other 1% there is OnVisualParentChanged().

0

精彩评论

暂无评论...
验证码 换一张
取 消