From 3d4f11ced54a5ab214f09322463904e919a579ae Mon Sep 17 00:00:00 2001 From: Piotr Czaja Date: Tue, 31 Jan 2017 11:05:15 +0100 Subject: [PATCH] [TabbedPage] Add sending OnAppearing and OnDisappearing notifications Change-Id: Id8094a1a06a96934ee0c41015fd8da2c1421e4bd Signed-off-by: Piotr Czaja --- Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs old mode 100644 new mode 100755 index 2afacfb..dd8c44c --- a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs @@ -146,8 +146,6 @@ namespace Xamarin.Forms.Platform.Tizen { if (_tpage.SelectedItem == null) return; - Element.CurrentPage = _itemToItemPage[_tpage.SelectedItem]; - //detach content from view without EvasObject changes if (_tcontent != null) { @@ -155,14 +153,18 @@ namespace Xamarin.Forms.Platform.Tizen _tcontent.Hide(); //unpack content that is hiden an prepare for new content _box.UnPack(_tcontent); + (Element.CurrentPage as IPageController)?.SendDisappearing(); } + Element.CurrentPage = _itemToItemPage[_tpage.SelectedItem]; + //create EvasObject using renderer and remember to not destroy - //it for better performance (creat once) + //it for better performance (create once) _tcontent = Platform.GetOrCreateRenderer(Element.CurrentPage).NativeView; _tcontent.SetAlignment(-1, -1); _tcontent.SetWeight(1, 1); _tcontent.Show(); _box.PackEnd(_tcontent); + (Element.CurrentPage as IPageController)?.SendAppearing(); } void CurrentPageChanged() -- 2.7.4