summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs')
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs24
1 files changed, 5 insertions, 19 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs b/Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs
index 5751aaf..1a10b70 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/MasterDetailPage.cs
@@ -69,11 +69,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native
EvasObject _mainWidget;
/// <summary>
- /// The <see cref="IsPresented"/> property value.
- /// </summary>
- bool _isPresented;
-
- /// <summary>
/// The <see cref="IsGestureEnabled"/> property value.
/// </summary>
bool _isGestureEnabled;
@@ -123,7 +118,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
Proportion = s_splitRatio,
};
- _drawer = new Panel(this)
+ _drawer = new Panel(Forms.Context.MainWindow)
{
Direction = PanelDirection.Left,
};
@@ -131,12 +126,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
_drawer.SetScrollableArea(1.0);
_drawer.Toggled += (object sender, EventArgs e) =>
{
- IsPresented = _drawer.IsOpen;
- };
-
- IsPresentedChanged += (sender, e) =>
- {
- _drawer.IsOpen = IsPresented;
+ IsPresentedChanged?.Invoke(this, EventArgs.Empty);
};
ConfigureLayout();
@@ -230,15 +220,14 @@ namespace Xamarin.Forms.Platform.Tizen.Native
{
get
{
- return _isPresented;
+ return _drawer.IsOpen;
}
set
{
- if (_isPresented != value)
+ if (_drawer.IsOpen != value)
{
- _isPresented = value;
- IsPresentedChanged?.Invoke(this, EventArgs.Empty);
+ _drawer.IsOpen = value;
}
}
}
@@ -348,12 +337,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
{
_drawer.SetContent(_masterCanvas, true);
PackEnd(_detailCanvas);
- PackEnd(_drawer);
-
_drawer.Show();
_mainWidget = _detailCanvas;
-
_drawer.IsOpen = IsPresented;
}