From 820c53ae01fa95075fd3990f56a81a30e38e8312 Mon Sep 17 00:00:00 2001 From: Dominique Louis Date: Thu, 10 Jan 2019 10:08:49 +0000 Subject: [Mac] Initial Binding Editor Dialog. --- .../Properties/Resources.Designer.cs | 85 +++++++++++++++------- Xamarin.PropertyEditing/Properties/Resources.resx | 22 ++++++ .../ViewModels/CreateBindingViewModel.cs | 8 +- 3 files changed, 85 insertions(+), 30 deletions(-) (limited to 'Xamarin.PropertyEditing') diff --git a/Xamarin.PropertyEditing/Properties/Resources.Designer.cs b/Xamarin.PropertyEditing/Properties/Resources.Designer.cs index 9168be7..f617aab 100644 --- a/Xamarin.PropertyEditing/Properties/Resources.Designer.cs +++ b/Xamarin.PropertyEditing/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -60,21 +60,12 @@ namespace Xamarin.PropertyEditing.Properties { } public static string Black { - get { - return ResourceManager.GetString ("Black", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add Variant. - /// - public static string AddVariant { get { - return ResourceManager.GetString("AddVariant", resourceCulture); + return ResourceManager.GetString("Black", resourceCulture); } } - - public static string BlackInitial { + + public static string BlackInitial { get { return ResourceManager.GetString("BlackInitial", resourceCulture); } @@ -973,24 +964,14 @@ namespace Xamarin.PropertyEditing.Properties { return ResourceManager.GetString("AccessibilityXEditor", resourceCulture); } } - - public static string AccessibilityYEditor - { - get { - return ResourceManager.GetString("AccessibilityYEditor", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove Variant. - /// - public static string RemoveVariant { + + public static string AccessibilityYEditor { get { - return ResourceManager.GetString("RemoveVariant", resourceCulture); + return ResourceManager.GetString("AccessibilityYEditor", resourceCulture); } } - - public static string AccessibilityWidthEditor { + + public static string AccessibilityWidthEditor { get { return ResourceManager.GetString("AccessibilityWidthEditor", resourceCulture); } @@ -1169,5 +1150,53 @@ namespace Xamarin.PropertyEditing.Properties { return ResourceManager.GetString("Directory", resourceCulture); } } + + public static string AddVariant { + get { + return ResourceManager.GetString("AddVariant", resourceCulture); + } + } + + public static string RemoveVariant { + get { + return ResourceManager.GetString("RemoveVariant", resourceCulture); + } + } + + public static string CreateBindingTitle { + get { + return ResourceManager.GetString("CreateBindingTitle", resourceCulture); + } + } + + public static string ShowSettings { + get { + return ResourceManager.GetString("ShowSettings", resourceCulture); + } + } + + public static string HideSettings { + get { + return ResourceManager.GetString("HideSettings", resourceCulture); + } + } + + public static string Converter { + get { + return ResourceManager.GetString("Converter", resourceCulture); + } + } + + public static string SelectTypeTitle { + get { + return ResourceManager.GetString("SelectTypeTitle", resourceCulture); + } + } + + public static string DoneTitle { + get { + return ResourceManager.GetString("DoneTitle", resourceCulture); + } + } } } diff --git a/Xamarin.PropertyEditing/Properties/Resources.resx b/Xamarin.PropertyEditing/Properties/Resources.resx index fb081bb..0e4966b 100644 --- a/Xamarin.PropertyEditing/Properties/Resources.resx +++ b/Xamarin.PropertyEditing/Properties/Resources.resx @@ -751,5 +751,27 @@ Remove Variant + + + Create Binding + Create Binding for Object.Property + + + Show Settings + Show Settings for Binding to Object.Property + + + Hide Settings + Hide Settings for Binding to Object.Property + + + Converter + Converter for Binding to Object.Property + + + Select Type + + + Done diff --git a/Xamarin.PropertyEditing/ViewModels/CreateBindingViewModel.cs b/Xamarin.PropertyEditing/ViewModels/CreateBindingViewModel.cs index 4ae1fc5..6c1dff4 100644 --- a/Xamarin.PropertyEditing/ViewModels/CreateBindingViewModel.cs +++ b/Xamarin.PropertyEditing/ViewModels/CreateBindingViewModel.cs @@ -452,7 +452,7 @@ namespace Xamarin.PropertyEditing.ViewModels } private static readonly Resource NoValueConverter = new Resource (Resources.NoValueConverter); - private static readonly Resource AddValueConverter = new Resource ("<" + Resources.AddValueConverterEllipsis + ">"); + internal static readonly Resource AddValueConverter = new Resource ("<" + Resources.AddValueConverterEllipsis + ">"); private readonly PropertyVariation variations; private readonly IObjectEditor targetEditor; @@ -497,7 +497,11 @@ namespace Xamarin.PropertyEditing.ViewModels var converters = await TargetPlatform.BindingProvider.GetValueConverterResourcesAsync (this.targetEditor.Target); this.valueConverters.AddRange (converters); - this.valueConverters.Add (AddValueConverter); + + // Don't add the AddValueConverter resource if we are on Mac + if (Environment.OSVersion.Platform != PlatformID.Unix) { + this.valueConverters.Add (AddValueConverter); + } return this.valueConverters; } -- cgit v1.2.3