所谓框架对象--WPF framework-level element (those objects deriving from either FrameworkElement or FrameworkContentElement)
的生命周期见这里
值得注意的是Initialized事件的顺序在树(包括视觉树和逻辑树)的顺序是不确定的。而loaded事件居然是从父到子的。
The mechanism by which the Loaded event is raised is different than Initialized. The Initialized event is raised element by element, without a direct coordination by a completed element tree. By contrast, the Loaded event is raised as a coordinated effort throughout the entire element tree (specifically, the logical tree). When all elements in the tree are in a state where they are considered loaded, the Loaded event is first raised on the root element. The Loaded event is then raised successively on each child element.
本文探讨了WPF框架级别元素(从FrameworkElement或FrameworkContentElement派生的对象)的生命周期。初始化(Initialized)事件在元素树(包括视觉树和逻辑树)中的顺序不确定,而加载(Loaded)事件则遵循从父到子的顺序依次触发。
219

被折叠的 条评论
为什么被折叠?



