-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
IndicatorViewHandler.cs
47 lines (40 loc) · 1.58 KB
/
IndicatorViewHandler.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#nullable enable
#if __IOS__ || MACCATALYST
using PlatformView = Microsoft.Maui.Platform.MauiPageControl;
#elif MONOANDROID
using PlatformView = Microsoft.Maui.Platform.MauiPageControl;
#elif WINDOWS
using PlatformView = Microsoft.Maui.Platform.MauiPageControl;
#elif TIZEN
using PlatformView = Tizen.UIExtensions.ElmSharp.IndicatorView;
#elif (NETSTANDARD || !PLATFORM) || (NET6_0 && !IOS && !ANDROID && !TIZEN)
using PlatformView = System.Object;
#endif
namespace Microsoft.Maui.Handlers
{
public partial class IndicatorViewHandler : IIndicatorViewHandler
{
public static IPropertyMapper<IIndicatorView, IIndicatorViewHandler> Mapper = new PropertyMapper<IIndicatorView, IIndicatorViewHandler>(ViewMapper)
{
[nameof(IIndicatorView.Count)] = MapCount,
[nameof(IIndicatorView.Position)] = MapPosition,
[nameof(IIndicatorView.HideSingle)] = MapHideSingle,
[nameof(IIndicatorView.MaximumVisible)] = MapMaximumVisible,
[nameof(IIndicatorView.IndicatorSize)] = MapIndicatorSize,
[nameof(IIndicatorView.IndicatorColor)] = MapIndicatorColor,
[nameof(IIndicatorView.SelectedIndicatorColor)] = MapSelectedIndicatorColor,
[nameof(IIndicatorView.IndicatorsShape)] = MapIndicatorShape
};
public static CommandMapper<IActivityIndicator, IIndicatorViewHandler> CommandMapper = new(ViewCommandMapper)
{
};
public IndicatorViewHandler() : base(Mapper)
{
}
public IndicatorViewHandler(IPropertyMapper mapper) : base(mapper ?? Mapper)
{
}
IIndicatorView IIndicatorViewHandler.VirtualView => VirtualView;
PlatformView IIndicatorViewHandler.PlatformView => PlatformView;
}
}