For each UI control on wpf, there is a ‘loaded’ event. Suppose I have a user control with a list of other controls, like Combobox. Now, If I catch loaded event for both “usercontrol” and for “Combobox”, then the the loaded event is first occurred for Usercontrol and then for Combo box, which means when the user control is already loaded, its child elements may not be loaded completed. But, I want to catch the global load event, that means that load event will be occurred only when all controls are loaded successfully. How to achieve this please? Thanks in advance.
Share
There is no global
Loadedevent, you state that the ‘loaded event is first occurred for Usercontrol and then for Combo box’, this is probably due to the order in which you registered for these events. What exactly are you trying to achieve?Other events that might be of use to you are
LayoutUpdated, this fires each time the visual tree is modified. You can register a handler, catch the first time this event is raised, then check your UI state to determine when your UI is initially rendered.However, you normally only need to use these techniques if you are doing something quite complex or special within the UI, like creating a complex new control. For most applications you do not need to handle either of these events.