summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-05-04 12:18:40 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-05-04 12:18:40 (GMT)
commita2148444bafd728090c39c1f40700b43baded1e4 (patch)
treee6e116a491df5e501269d30f63f81942c90f4645 /Xamarin.Forms.Platform.WinRT
parente7d8c5aa5784cd059cdfcf4a75b9e2c59fc9d3d0 (diff)
downloadxamarin-forms-a2148444bafd728090c39c1f40700b43baded1e4.zip
xamarin-forms-a2148444bafd728090c39c1f40700b43baded1e4.tar.gz
xamarin-forms-a2148444bafd728090c39c1f40700b43baded1e4.tar.bz2
Add INavigationPageController (#149)
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r--Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
index 8bcf207..9fe59ba 100644
--- a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
@@ -12,6 +12,7 @@ using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Animation;
+using Xamarin.Forms.Internals;
#if WINDOWS_UWP
using Windows.UI.Xaml.Data;
using Windows.UI.Core;
@@ -154,8 +155,8 @@ namespace Xamarin.Forms.Platform.WinRT
if (oldElement != null)
{
- oldElement.PushRequested -= OnPushRequested;
- oldElement.PopRequested -= OnPopRequested;
+ ((INavigationPageController)oldElement).PushRequested -= OnPushRequested;
+ ((INavigationPageController)oldElement).PopRequested -= OnPopRequested;
oldElement.InternalChildren.CollectionChanged -= OnChildrenChanged;
oldElement.PropertyChanged -= OnElementPropertyChanged;
}
@@ -184,8 +185,8 @@ namespace Xamarin.Forms.Platform.WinRT
UpdateTitleColor();
UpdateNavigationBarBackground();
Element.PropertyChanged += OnElementPropertyChanged;
- Element.PushRequested += OnPushRequested;
- Element.PopRequested += OnPopRequested;
+ ((INavigationPageController)Element).PushRequested += OnPushRequested;
+ ((INavigationPageController)Element).PopRequested += OnPopRequested;
Element.InternalChildren.CollectionChanged += OnChildrenChanged;
if (!string.IsNullOrEmpty(Element.AutomationId))
@@ -391,8 +392,8 @@ namespace Xamarin.Forms.Platform.WinRT
void PushExistingNavigationStack()
{
- for (int i = Element.StackCopy.Count - 1; i >= 0; i--)
- SetPage(Element.StackCopy.ElementAt(i), false, false);
+ for (int i = ((INavigationPageController)Element).StackCopy.Count - 1; i >= 0; i--)
+ SetPage(((INavigationPageController)Element).StackCopy.ElementAt(i), false, false);
}
void SetPage(Page page, bool isAnimated, bool isPopping)