diff options
author | rina6350.you <rina6350.you@samsung.com> | 2017-04-14 13:52:05 +0900 |
---|---|---|
committer | rina6350.you <rina6350.you@samsung.com> | 2017-04-21 17:17:34 +0900 |
commit | 4299d4506599e3cb3a5308479470a5e670f42ef8 (patch) | |
tree | 4d8df7a174770873f8c952f59373161a1f6c7b90 | |
parent | dbecac74c994e4e42ffead0e9c5e7dfeba5e3835 (diff) | |
download | xamarin-forms-accepted/tizen/unified/20170421.115243.tar.gz xamarin-forms-accepted/tizen/unified/20170421.115243.tar.bz2 xamarin-forms-accepted/tizen/unified/20170421.115243.zip |
Add ToolTip based on Tizen Specificsubmit/tizen/20170421.082421accepted/tizen/unified/20170421.115243
* Update the version of the used elm-sharp.
* Update the version of xamarin package to 2.3.4-r214-005.
TASK=TCAPI-2259
change-Id: I1f0c65c3d67030b7a690fd0839a0a851c4f1bcba
-rwxr-xr-x[-rw-r--r--] | Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs | 23 | ||||
-rwxr-xr-x[-rw-r--r--] | Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj | 2 | ||||
-rw-r--r-- | packaging/xamarin-forms-tizen.spec | 2 |
4 files changed, 39 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs index a7e7eff6..6e3d456c 100644..100755 --- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs @@ -24,6 +24,8 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific public static readonly BindableProperty NextFocusForwardViewProperty = BindableProperty.Create("NextFocusForwardView", typeof(View), typeof(VisualElement), default(View)); + public static readonly BindableProperty ToolTipProperty = BindableProperty.Create("ToolTip", typeof(string), typeof(VisualElement), default(string)); + public static string GetStyle(BindableObject element) { return (string)element.GetValue(StyleProperty); @@ -257,5 +259,26 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific { bindable.SetValue(NextFocusDirectionProperty, FocusDirection.None); } + + public static string GetToolTip(BindableObject element) + { + return (string)element.GetValue(ToolTipProperty); + } + + public static void SetToolTip(BindableObject element, string value) + { + element.SetValue(ToolTipProperty, value); + } + + public static string GetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config) + { + return GetToolTip(config.Element); + } + + public static IPlatformElementConfiguration<Tizen, FormsElement> SetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value) + { + SetToolTip(config.Element, value); + return config; + } } }
\ No newline at end of file diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs index a103abf7..8b288698 100644..100755 --- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs @@ -66,6 +66,7 @@ namespace Xamarin.Forms.Platform.Tizen RegisterPropertyHandler(Specific.NextFocusRightViewProperty, UpdateFocusRightView); RegisterPropertyHandler(Specific.NextFocusBackViewProperty, UpdateFocusBackView); RegisterPropertyHandler(Specific.NextFocusForwardViewProperty, UpdateFocusForwardView); + RegisterPropertyHandler(Specific.ToolTipProperty, UpdateToolTip); RegisterPropertyHandler(VisualElement.AnchorXProperty, ApplyTransformation); RegisterPropertyHandler(VisualElement.AnchorYProperty, ApplyTransformation); @@ -835,6 +836,19 @@ namespace Xamarin.Forms.Platform.Tizen } } + void UpdateToolTip() + { + var tooltip = Specific.GetToolTip(Element); + if (tooltip != null) + { + NativeView.SetTooltipText(tooltip); + } + else + { + NativeView.UnsetTooltip(); + } + } + void SetNextFocusViewInternal(string direction) { var widget = NativeView as Widget; diff --git a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj index 26d62846..9a13995c 100644..100755 --- a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj +++ b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj @@ -6,7 +6,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="ElmSharp" Version="1.1.0-beta-018" /> + <PackageReference Include="ElmSharp" Version="1.1.0-beta-021" /> <PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" /> <PackageReference Include="Tizen.Applications" Version="1.3.2" /> <PackageReference Include="Tizen.System.Information" Version="1.0.2" /> diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec index 63c0cc63..c782ccd5 100644 --- a/packaging/xamarin-forms-tizen.spec +++ b/packaging/xamarin-forms-tizen.spec @@ -2,7 +2,7 @@ %define XF_RELEASE 214 # Increase this XF_DEV_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed. -%define XF_DEV_VERSION 004 +%define XF_DEV_VERSION 005 Name: xamarin-forms-tizen Summary: Xamarin.Forms for Tizen platform |