summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs b/Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs
index 6f54e80..c424c7f 100644
--- a/Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs
+++ b/Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs
@@ -55,6 +55,8 @@ namespace Xamarin.Forms.Platform.UWP
{
set { Control.ToolbarForeground = value; }
}
+
+IPageController PageController => Element as IPageController;
IMasterDetailPageController MasterDetailPageController => Element as IMasterDetailPageController;
@@ -196,16 +198,13 @@ namespace Xamarin.Forms.Platform.UWP
if (Element == null)
return;
- Element.SendAppearing();
+ PageController.SendAppearing();
UpdateBounds();
}
void OnControlUnlaoded(object sender, RoutedEventArgs routedEventArgs)
{
- if (Element == null)
- return;
-
- Element.SendDisappearing();
+ PageController?.SendDisappearing();
}
void OnDetailPropertyChanged(object sender, PropertyChangedEventArgs e)