From a4b2a4e45f0931b67b5a4a18099877006edb89a3 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Mon, 3 Dec 2018 13:49:09 +0100 Subject: [PATCH] [UWP] Rename ConvertExtensions to ColorExtensions and change access to public (#4558) fixes #1522 closes #1535 * Rename ConvertExtensions to ColorExtensions and change access to public - fixes #1522 - closes #1535 * remove unused convertextensions --- Xamarin.Forms.Platform.UAP/ColorExtensions.cs | 14 ++++++++++++-- Xamarin.Forms.Platform.UAP/ConvertExtensions.cs | 17 ----------------- .../Xamarin.Forms.Platform.UAP.csproj | 3 +-- 3 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 Xamarin.Forms.Platform.UAP/ConvertExtensions.cs diff --git a/Xamarin.Forms.Platform.UAP/ColorExtensions.cs b/Xamarin.Forms.Platform.UAP/ColorExtensions.cs index d8b5ae3..23d33f0 100644 --- a/Xamarin.Forms.Platform.UAP/ColorExtensions.cs +++ b/Xamarin.Forms.Platform.UAP/ColorExtensions.cs @@ -4,7 +4,7 @@ using Windows.UI.Xaml.Media; namespace Xamarin.Forms.Platform.UWP { - internal static class ColorExtensions + public static class ColorExtensions { public static Windows.UI.Color GetContrastingColor(this Windows.UI.Color color) { @@ -24,5 +24,15 @@ namespace Xamarin.Forms.Platform.UWP { return solidColorBrush.Color.ToFormsColor(); } + + public static Brush ToBrush(this Color color) + { + return new SolidColorBrush(color.ToWindowsColor()); + } + + public static Windows.UI.Color ToWindowsColor(this Color color) + { + return Windows.UI.Color.FromArgb((byte)(color.A * 255), (byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255)); + } } -} \ No newline at end of file +} diff --git a/Xamarin.Forms.Platform.UAP/ConvertExtensions.cs b/Xamarin.Forms.Platform.UAP/ConvertExtensions.cs deleted file mode 100644 index a5b4ff1..0000000 --- a/Xamarin.Forms.Platform.UAP/ConvertExtensions.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Windows.UI.Xaml.Media; - -namespace Xamarin.Forms.Platform.UWP -{ - internal static class ConvertExtensions - { - public static Brush ToBrush(this Color color) - { - return new SolidColorBrush(color.ToWindowsColor()); - } - - public static Windows.UI.Color ToWindowsColor(this Color color) - { - return Windows.UI.Color.FromArgb((byte)(color.A * 255), (byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255)); - } - } -} \ No newline at end of file diff --git a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj index ff57b82..d660e95 100644 --- a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj +++ b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj @@ -47,7 +47,6 @@ - @@ -124,7 +123,7 @@ - + -- 2.7.4