Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
jfversluis committed Aug 30, 2021
1 parent fc2294e commit b3a71b3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using AColor = Android.Graphics.Color;

namespace Xamarin.CommunityToolkit.MauiCompat
{
public static partial class MauiColorExtensions
{
public static AColor ToAndroid(this Microsoft.Maui.Graphics.Color self)
{
var colorToConvert = self;

if (colorToConvert == null)
{
colorToConvert = Microsoft.Maui.Graphics.Colors.Transparent;
}

return Microsoft.Maui.Controls.Compatibility.Platform.Android.ColorExtensions.ToAndroid(colorToConvert);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using iColor = UIKit.UIColor;

namespace Xamarin.CommunityToolkit.MauiCompat
{
public static partial class MauiColorExtensions
{
public static iColor ToUIColor(this Microsoft.Maui.Graphics.Color self)
{
var colorToConvert = self;

if (colorToConvert == null)
{
colorToConvert = Microsoft.Maui.Graphics.Colors.Transparent;
}

return Microsoft.Maui.Controls.Compatibility.Platform.iOS.ColorExtensions.ToUIColor(colorToConvert);
}
}
}

0 comments on commit b3a71b3

Please sign in to comment.