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
3f49642
commit 4c12060
Showing
3 changed files
with
131 additions
and
1 deletion.
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
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,88 @@ | ||
using Microsoft.Maui; | ||
using Microsoft.Maui.Handlers; | ||
|
||
namespace Microsoft.Maui.Controls | ||
{ | ||
public partial class Label | ||
{ | ||
public static void RemapForControls() | ||
{ | ||
// Adjust the mappings to preserve Controls.Label legacy behaviors | ||
// ILabel does not include the TextType property, so we map it here to handle HTML text | ||
// And we map some of the other property handlers to Controls-specific versions that avoid steppingon HTML text settings | ||
|
||
IPropertyMapper<ILabel, LabelHandler> ControlsLabelMapper = new PropertyMapper<Label, LabelHandler>(LabelHandler.LabelMapper) | ||
{ | ||
[nameof(TextType)] = MapTextType, | ||
[nameof(Text)] = MapText, | ||
[nameof(TextDecorations)] = MapTextDecorations, | ||
[nameof(CharacterSpacing)] = MapCharacterSpacing, | ||
[nameof(LineHeight)] = MapLineHeight, | ||
[nameof(ILabel.Font)] = MapFont, | ||
[nameof(TextColor)] = MapTextColor | ||
}; | ||
|
||
LabelHandler.LabelMapper = ControlsLabelMapper; | ||
} | ||
|
||
public static void MapTextType(LabelHandler handler, Label label) | ||
{ | ||
handler.NativeView?.UpdateText(label); | ||
} | ||
|
||
public static void MapText(LabelHandler handler, Label label) | ||
{ | ||
handler.NativeView?.UpdateText(label); | ||
} | ||
|
||
public static void MapTextDecorations(LabelHandler handler, Label label) | ||
{ | ||
if (label?.TextType == TextType.Html) | ||
{ | ||
return; | ||
} | ||
|
||
LabelHandler.MapTextDecorations(handler, label); | ||
} | ||
|
||
public static void MapCharacterSpacing(LabelHandler handler, Label label) | ||
{ | ||
if (label?.TextType == TextType.Html) | ||
{ | ||
return; | ||
} | ||
|
||
LabelHandler.MapCharacterSpacing(handler, label); | ||
} | ||
|
||
public static void MapLineHeight(LabelHandler handler, Label label) | ||
{ | ||
if (label?.TextType == TextType.Html) | ||
{ | ||
return; | ||
} | ||
|
||
LabelHandler.MapLineHeight(handler, label); | ||
} | ||
|
||
public static void MapFont(LabelHandler handler, Label label) | ||
{ | ||
if (label?.TextType == TextType.Html) | ||
{ | ||
return; | ||
} | ||
|
||
LabelHandler.MapFont(handler, label); | ||
} | ||
|
||
public static void MapTextColor(LabelHandler handler, Label label) | ||
{ | ||
if (label?.TextType == TextType.Html) | ||
{ | ||
return; | ||
} | ||
|
||
LabelHandler.MapTextColor(handler, label); | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/Core/src/Handlers/RefreshView/RefreshViewHandler.Tizen.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,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Microsoft.Maui.Graphics; | ||
using ElmSharp; | ||
|
||
namespace Microsoft.Maui.Handlers | ||
{ | ||
// TODO : Need to implement | ||
public partial class RefreshViewHandler : ViewHandler<IRefreshView, EvasObject> | ||
{ | ||
protected override EvasObject CreateNativeView() => throw new NotImplementedException(); | ||
|
||
public static void MapIsRefreshing(RefreshViewHandler handler, IRefreshView refreshView) | ||
{ | ||
} | ||
|
||
public static void MapContent(RefreshViewHandler handler, IRefreshView refreshView) | ||
{ | ||
} | ||
|
||
public static void MapRefreshColor(RefreshViewHandler handler, IRefreshView refreshView) | ||
{ | ||
} | ||
|
||
public static void MapRefreshViewBackground(RefreshViewHandler handler, IView view) | ||
{ | ||
} | ||
|
||
} | ||
} |