开发者

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

开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜