summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjh5.cho <jh5.cho@samsung.com>2017-02-09 07:11:33 (GMT)
committerjh5.cho <jh5.cho@samsung.com>2017-02-09 07:11:33 (GMT)
commit4379d3fead1b3d9271453c4883aac23f41616942 (patch)
tree12cd7fd3666eb1f8a3b0c1211d483037e814ed0a
parent92d363dd7d7a3bd23f31a0bbda936b00e9b4fd33 (diff)
downloadxamarin-forms-4379d3fead1b3d9271453c4883aac23f41616942.zip
xamarin-forms-4379d3fead1b3d9271453c4883aac23f41616942.tar.gz
xamarin-forms-4379d3fead1b3d9271453c4883aac23f41616942.tar.bz2
Fix Hiding Master Page on MasterDetailPagerefs/changes/82/113882/1
- Fix to hide Master page which is caused by the focus issue - Remove private variable '_isPresented' to remove unnecessary steps TASK=TCAAPI-2192 Change-Id: I0a5edc4622643a11c6afa33f58b86fc773a15915
-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;
}