namespace Xamarin.Forms.Platform.UWP
{
- internal static class ColorExtensions
+ public static class ColorExtensions
{
public static Windows.UI.Color GetContrastingColor(this Windows.UI.Color color)
{
{
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
+}
+++ /dev/null
-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
<Compile Include="IImageVisualElementRenderer.cs" />
<Compile Include="ImageButtonRenderer.cs" />
<Compile Include="CollectionViewRenderer.cs" />
- <Compile Include="ColorExtensions.cs" />
<Compile Include="FormsCancelButton.cs" />
<Compile Include="AlertDialog.cs" />
<Compile Include="Items\ItemContentControl.cs" />
<Compile Include="CellControl.cs" />
<Compile Include="CollapseWhenEmptyConverter.cs" />
<Compile Include="ColorConverter.cs" />
- <Compile Include="ConvertExtensions.cs" />
+ <Compile Include="ColorExtensions.cs" />
<Compile Include="DatePickerRenderer.cs" />
<Compile Include="DefaultRenderer.cs" />
<Compile Include="EditorRenderer.cs" />