diff --git a/dev/Expander/Expander.cpp b/dev/Expander/Expander.cpp
index a2f22bf3cd..3497d0958e 100644
--- a/dev/Expander/Expander.cpp
+++ b/dev/Expander/Expander.cpp
@@ -103,15 +103,27 @@ void Expander::RaiseCollapsedEvent(const winrt::Expander& container)
void Expander::OnIsExpandedPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
{
- if (IsExpanded())
+ const auto isExpanded = IsExpanded();
+
+ if (isExpanded)
{
RaiseExpandingEvent(*this);
}
else
{
- RaiseCollapsedEvent(*this);
+ // Available for a 'Collapsing' event
}
+
UpdateExpandState(true);
+
+ if (isExpanded)
+ {
+ // Available for an 'Expanded' event
+ }
+ else
+ {
+ RaiseCollapsedEvent(*this);
+ }
}
void Expander::OnExpandDirectionPropertyChanged(const winrt::DependencyPropertyChangedEventArgs& /*args*/)
diff --git a/dev/Expander/Expander.xaml b/dev/Expander/Expander.xaml
index 6d52bf384c..93e1ac17a0 100644
--- a/dev/Expander/Expander.xaml
+++ b/dev/Expander/Expander.xaml
@@ -20,17 +20,15 @@
Without this override, the narrator user that focuses the expander on a touch screen will see that pressing "Tab"
doesn't work how they would expect.-->
-
+
-
-
-
-
-
-
-
+
+
+
+
+
@@ -110,7 +108,7 @@
-
+
@@ -128,36 +126,36 @@
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch"
+ Padding="{TemplateBinding Padding}">
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
@@ -27,23 +31,28 @@
-
-
- 1
0
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
@@ -53,22 +62,28 @@
-
-
- 1
0
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
@@ -78,23 +93,32 @@
-
-
- 2
2
+
+
+
+
+
+
+ 48
+
+
+ Stretch
+ Center
+ 16,0,0,0
20,0,8,0
32
12
- 48
+
+
16
- 16,0,0,0
- 1,0,1,1
- 1,1,1,0
+ 1,0,1,1
+ 1,1,1,0