From 17e4cb663a432022573d130d086feddadeb61d01 Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Thu, 6 Jul 2017 15:47:27 +0900 Subject: Use bool? for VisualElement.IsFocusAllowed property (Specific) -TASK=TCAPI-2552 Change-Id: I5e38e2f47295d60a5850aa135d9fe250dab22ffe --- .../PlatformConfiguration/TizenSpecific/VisualElement.cs | 8 ++++---- Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs old mode 100755 new mode 100644 index 6e3d456c..670c48c5 --- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs @@ -7,7 +7,7 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific { public static readonly BindableProperty StyleProperty = BindableProperty.Create("ThemeStyle", typeof(string), typeof(VisualElement), default(string)); - public static readonly BindableProperty IsFocusAllowedProperty = BindableProperty.Create("IsFocusAllowed", typeof(bool), typeof(VisualElement), true); + public static readonly BindableProperty IsFocusAllowedProperty = BindableProperty.Create("IsFocusAllowed", typeof(bool?), typeof(VisualElement), null); [EditorBrowsable(EditorBrowsableState.Never)] public static readonly BindableProperty NextFocusDirectionProperty = BindableProperty.Create("NextFocusDirection", typeof(string), typeof(VisualElement), FocusDirection.None, propertyChanged: OnNextFocusDirectionPropertyChanged); @@ -47,9 +47,9 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific return config; } - public static bool IsFocusAllowed(BindableObject element) + public static bool? IsFocusAllowed(BindableObject element) { - return (bool)element.GetValue(IsFocusAllowedProperty); + return (bool?)element.GetValue(IsFocusAllowedProperty); } public static void SetFocusAllowed(BindableObject element, bool value) @@ -57,7 +57,7 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific element.SetValue(IsFocusAllowedProperty, value); } - public static bool IsFocusAllowed(this IPlatformElementConfiguration config) + public static bool? IsFocusAllowed(this IPlatformElementConfiguration config) { return IsFocusAllowed(config.Element); } diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs index 0d6b3036..a6c1c3a3 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs @@ -795,9 +795,9 @@ namespace Xamarin.Forms.Platform.Tizen if (!initialize) { var widget = NativeView as Widget; - if (widget != null) + if (widget != null && Specific.IsFocusAllowed(Element).HasValue) { - widget.AllowFocus(Specific.IsFocusAllowed(Element)); + widget.AllowFocus((bool)Specific.IsFocusAllowed(Element)); } else { -- cgit v1.2.3