- Removes the `IStyler` service and the `Styler` implementation
- Moves the logic for applying styles and control themes into `StyledElement`
- Removes the style `TryAttach` method from the public API
- Removes style caching for now - this will need to be added back
* Add Loaded/Unloaded events
* Don't allow OnLoaded() twice unless OnUnloaded() is called
* Call OnLoadedCore within Render()
* Call OnLoadedCore() from OnAttachedToVisualTreeCore by scheduling it on the dispatcher
* Improve comments
* Queue loaded events
* Make the loaded queue static
* Make more members static per review
* Make sure control wasn't already scheduling for Loaded event
* Add locks around HashSet usage for when enumerating
* Remove from loaded queue in OnUnloadedCore() as failsafe
* Make Window raise its own Loaded/Unloaded events
* Attempt to fix leak tests to work with Loaded events
* Make WindowBase raise its own Loaded/Unloaded events
* Move hotkey leak tests to the LeakTest project
* Address some code review comments
* Attempt at actually queueing Loaded events again
* Fix typo
* Minor improvements
* Update controls benchmark
Co-authored-by: Max Katz <maxkatz6@outlook.com>
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
...during ApplyTemplate. This was so that ItemsControls could their find
ItemsPresenters nested in other templated controls. Instead use
IItemsPresenterHost to make the presenter register itself with its
TemplatedParent.