`SelectionModel` can have a selection set before its `Source` is initialized. In this case, be sure to trim invalid selections from the model before continuing.
Fixes#3919
`Changing_Resource_In_Templated_Parent_Should_Affect_Templated_Child` now fails because resource changed messages no longer traverse into templated children.
Make sure the item we're selecting is within the requested range. Also refactored the unit tests to do a simple test on `SelectedIndices` instead of using `IsSelectedWithPartial` because both can't really be tested together using the old testing method.
And remove child selection when a `TreeViewItem` is un-expanded.
This is necessary because we don't get enough information about a materialized `TreeViewItem` to select it when materialized, so the `SelectionModel` and `TreeViewItem` selection state gets out of sync.
Make `SelectionModelChildrenRequestedEventArgs.Children` an observable, so that the we can react to the children collection object changing, as well as the children inside the collection changing.
Upstream issue: https://github.com/microsoft/microsoft-ui-xaml/issues/2404
Top-level controls cannot have a `Bounds` offset, and their `(Min)/(Max)/Width` and `(Min)/(Max)/Height` reflects the client size of the actual window, so don't need to be applied at the layout level.
Fixes#3784
So that the event can be marked as handled if necessary. Mark the event as handled in `AutoCompleteBox`, `ComboBox` and `DatePicker`, but _not_ `ContextMenu`. Fixes#3760.