forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e322b63
commit 13dbadf
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.Maui.Graphics; | ||
|
||
namespace Microsoft.Maui.Handlers | ||
{ | ||
public partial class BoxViewHandler : ViewHandler<IBoxView, MauiBoxView> | ||
{ | ||
protected override MauiBoxView CreateNativeView() | ||
{ | ||
return new MauiBoxView(NativeParent!) | ||
{ | ||
Drawable = new BoxViewDrawable(VirtualView) | ||
}; | ||
} | ||
|
||
public static void MapColor(BoxViewHandler handler, IBoxView boxView) | ||
{ | ||
handler.NativeView?.InvalidateBoxView(boxView); | ||
} | ||
|
||
public static void MapCornerRadius(BoxViewHandler handler, IBoxView boxView) | ||
{ | ||
handler.NativeView?.InvalidateBoxView(boxView); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Microsoft.Maui.Graphics; | ||
|
||
namespace Microsoft.Maui | ||
{ | ||
public static class BoxViewExtensions | ||
{ | ||
public static void InvalidateBoxView(this MauiBoxView nativeView, IBoxView boxView) | ||
{ | ||
nativeView.Invalidate(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using ElmSharp; | ||
using SkiaGraphicsView = Microsoft.Maui.Platform.Tizen.SkiaGraphicsView; | ||
|
||
namespace Microsoft.Maui | ||
{ | ||
public class MauiBoxView : SkiaGraphicsView | ||
{ | ||
public MauiBoxView(EvasObject parent) : base(parent) | ||
{ | ||
DeviceScalingFactor = (float)Tizen.UIExtensions.Common.DeviceInfo.ScalingFactor; | ||
} | ||
} | ||
} |