-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Showing
9 changed files
with
144 additions
and
31 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,18 @@ | ||
#nullable disable | ||
using System; | ||
using Microsoft.Maui.Controls.Compatibility; | ||
using Microsoft.Maui.Handlers; | ||
|
||
namespace Microsoft.Maui.Controls | ||
{ | ||
public partial class Border | ||
{ | ||
internal static new void RemapForControls() | ||
{ | ||
// Ideally we wouldn't need these and we could create a cross cutting modify at the VisualElement level | ||
// But we can't currently do that with mappers | ||
BorderHandler.Mapper.ModifyMapping<IBorderView, IBorderHandler>(nameof(IView.Width), MapWidthOrHeight); | ||
BorderHandler.Mapper.ModifyMapping<IBorderView, IBorderHandler>(nameof(IView.Height), MapWidthOrHeight); | ||
} | ||
} | ||
} |
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
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
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/Core.UnitTests/TestClasses/BasicVisualElement.cs
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,23 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Animations; | ||
|
||
using Microsoft.Maui.Handlers; | ||
|
||
namespace Microsoft.Maui.Controls.Core.UnitTests | ||
{ | ||
public class BasicVisualElement : VisualElement | ||
{ | ||
} | ||
|
||
public class BasicVisualElementHandler : ViewHandler<BasicVisualElement, object> | ||
{ | ||
public BasicVisualElementHandler(IPropertyMapper mapper, CommandMapper commandMapper = null) : base(mapper, commandMapper) | ||
{ | ||
} | ||
|
||
protected override object CreatePlatformView() | ||
{ | ||
return new object(); | ||
} | ||
} | ||
} |
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
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