summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2017-04-14 12:56:04 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:22 +0900
commit84bbc1fcb61edd528e20440832fa5eaf100feb26 (patch)
tree97f50b515477fe2fd11239951f5d6784109d931d /Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
parentca3b6f0f0954199156b20d88856f3c9459875a10 (diff)
downloadxamarin-forms-84bbc1fcb61edd528e20440832fa5eaf100feb26.tar.gz
xamarin-forms-84bbc1fcb61edd528e20440832fa5eaf100feb26.tar.bz2
xamarin-forms-84bbc1fcb61edd528e20440832fa5eaf100feb26.zip
Fix FocusDirection to string type
Fix FocusDirection to string type to avoid invalid reference in Tizen.Xamarin.Forms.Extension Change-Id: Ie452f14a32dbe0b5776ab28996eb52c81e8223c4
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
index 51170bd6..d7f77150 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
@@ -5,6 +5,7 @@ using System.ComponentModel;
using ElmSharp;
using ESize = ElmSharp.Size;
using ERect = ElmSharp.Rect;
+using EFocusDirection = ElmSharp.FocusDirection;
using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.VisualElement;
using XFocusDirection = Xamarin.Forms.PlatformConfiguration.TizenSpecific.FocusDirection;
@@ -809,7 +810,7 @@ namespace Xamarin.Forms.Platform.Tizen
var widget = NativeView as Widget;
if (widget != null)
{
- widget.FocusNext(direction.ToNative());
+ widget.FocusNext(ConvertToNativeFocusDirection(direction));
}
else
{
@@ -818,7 +819,7 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
- void SetNextFocusViewInternal(XFocusDirection direction)
+ void SetNextFocusViewInternal(string direction)
{
var widget = NativeView as Widget;
if (widget != null)
@@ -850,7 +851,7 @@ namespace Xamarin.Forms.Platform.Tizen
}
if (nativeControl != null)
{
- widget.SetNextFocusObject(nativeControl, direction.ToNative());
+ widget.SetNextFocusObject(nativeControl, ConvertToNativeFocusDirection(direction));
}
}
else
@@ -994,6 +995,17 @@ namespace Xamarin.Forms.Platform.Tizen
NativeView.EvasMap = map;
}
}
+
+ EFocusDirection ConvertToNativeFocusDirection(string direction) {
+ if (direction == XFocusDirection.Back) return EFocusDirection.Previous;
+ if (direction == XFocusDirection.Forward) return EFocusDirection.Next;
+ if (direction == XFocusDirection.Up) return EFocusDirection.Up;
+ if (direction == XFocusDirection.Down) return EFocusDirection.Down;
+ if (direction == XFocusDirection.Right) return EFocusDirection.Right;
+ if (direction == XFocusDirection.Left) return EFocusDirection.Left;
+
+ return EFocusDirection.Next;
+ }
}
internal static class Settings