Skip to content

Commit a067ece

Browse files
committed
Bump to latest (rc1)
- ImageButtonHandler and Handler Re-usability (dotnet#2352) - Remove IBoxView (dotnet#2619) - Add SupportedOSPlatformVersion (dotnet#2565) - Merge all the .NET 6 projects/solutions (dotnet#2505) - Shadow Support (dotnet#570) - Add IndicatorView handler(dotnet#2038)
1 parent 7f3e86a commit a067ece

31 files changed

+276
-154
lines changed
File renamed without changes.

.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
</ItemGroup>
3232
<ItemGroup Condition="$(TargetFramework.StartsWith('tizen')) != true AND $(TargetFramework.StartsWith('net6.0-tizen')) != true ">
3333
<Compile Remove="**\**\*.Tizen.cs" />
34-
<None Include="**\**\*.Tizen.cs" />
34+
<None Include="**\**\*.Tizen.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
3535
<Compile Remove="**\Tizen\**\*.cs" />
36-
<None Include="**\Tizen\**\*.cs" />
36+
<None Include="**\Tizen\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
3737
</ItemGroup>
3838
<ItemGroup Condition="'$(_MauiNoTargetPlatform)' != 'True'">
3939
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) != true AND '$(TargetFramework)' != 'net6.0'">

src/Controls/src/Core/Platform/Tizen/DragGestureHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async Task<EvasObject> GetImageIconAsync(EvasObject parent)
177177
var services = Handler.MauiContext?.Services;
178178
var provider = services.GetService(typeof(IImageSourceServiceProvider)) as IImageSourceServiceProvider;
179179
var service = provider?.GetImageSourceService(mImage);
180-
var result = await service.LoadImageAsync(mImage, image);
180+
var result = await service.GetImageAsync(mImage, image);
181181
if (result == null)
182182
return null;
183183
return image;

src/Controls/src/Core/Platform/Tizen/Shell/ShellItemView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ EToolbarItem AppendTabsItem(string text, ImageSource iconSource)
447447
var provider = MauiContext.Services.GetRequiredService<IImageSourceServiceProvider>();
448448
var service = provider.GetRequiredImageSourceService(iconSource);
449449

450-
_ = service.LoadImageAsync(iconSource, image);
450+
_ = service.GetImageAsync(iconSource, image);
451451

452452
item.SetIconPart(image);
453453
}

src/Controls/src/Core/Platform/Tizen/Shell/ShellNavBar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ async void UpdateMenuIcon()
265265
var provider = MauiContext.Services.GetRequiredService<IImageSourceServiceProvider>();
266266
var service = provider.GetRequiredImageSourceService(source);
267267

268-
await service.LoadImageAsync(source, _menuIcon);
268+
await service.GetImageAsync(source, _menuIcon);
269269
}
270270
_menuButton.SetIconPart(_menuIcon);
271271
_menuButton.Show();

src/Core/src/Handlers/BoxView/BoxViewHandler.Tizen.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Core/src/Handlers/Button/ButtonHandler.Tizen.cs

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Threading.Tasks;
23
using Tizen.UIExtensions.ElmSharp;
34

45
namespace Microsoft.Maui.Handlers
@@ -17,7 +18,6 @@ protected override void ConnectHandler(Button nativeView)
1718
nativeView.Released += OnButtonClicked;
1819
nativeView.Clicked += OnButtonReleased;
1920
nativeView.Pressed += OnButtonPressed;
20-
2121
base.ConnectHandler(nativeView);
2222
}
2323

@@ -26,32 +26,40 @@ protected override void DisconnectHandler(Button nativeView)
2626
nativeView.Released -= OnButtonClicked;
2727
nativeView.Clicked -= OnButtonReleased;
2828
nativeView.Pressed -= OnButtonPressed;
29-
3029
base.DisconnectHandler(nativeView);
3130
}
3231

33-
public static void MapText(ButtonHandler handler, IButton button)
32+
public static void MapText(IButtonHandler handler, IText button)
3433
{
35-
handler.NativeView?.UpdateText(button);
34+
handler.TypedNativeView?.UpdateText(button);
3635
}
3736

38-
public static void MapTextColor(ButtonHandler handler, IButton button)
37+
public static void MapTextColor(IButtonHandler handler, ITextStyle button)
3938
{
40-
handler.NativeView?.UpdateTextColor(button);
39+
handler.TypedNativeView?.UpdateTextColor(button);
4140
}
4241

43-
//TODO : Need to impl
44-
[MissingMapper]
45-
public static void MapImageSource(ButtonHandler handler, IButton image) { }
42+
public static void MapImageSource(IButtonHandler handler, IButton image) =>
43+
MapImageSourceAsync(handler, image).FireAndForget(handler);
44+
45+
public static Task MapImageSourceAsync(IButtonHandler handler, IButton image)
46+
{
47+
if (image.ImageSource == null)
48+
{
49+
return Task.CompletedTask;
50+
}
51+
52+
return handler.ImageSourceLoader.UpdateImageSourceAsync();
53+
}
4654

4755
[MissingMapper]
48-
public static void MapCharacterSpacing(ButtonHandler handler, IButton button) { }
56+
public static void MapCharacterSpacing(IButtonHandler handler, ITextStyle button) { }
4957

5058
[MissingMapper]
51-
public static void MapFont(ButtonHandler handler, IButton button) { }
59+
public static void MapFont(IButtonHandler handler, ITextStyle button) { }
5260

5361
[MissingMapper]
54-
public static void MapPadding(ButtonHandler handler, IButton button) { }
62+
public static void MapPadding(IButtonHandler handler, IButton button) { }
5563

5664
void OnButtonClicked(object? sender, EventArgs e)
5765
{
@@ -67,5 +75,11 @@ void OnButtonPressed(object? sender, EventArgs e)
6775
{
6876
VirtualView?.Pressed();
6977
}
78+
79+
void OnSetImageSource(Image? image)
80+
{
81+
NativeView.Image = image;
82+
VirtualView.ImageSourceLoaded();
83+
}
7084
}
7185
}

src/Core/src/Handlers/Button/ButtonHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using PlatformView = Google.Android.Material.Button.MaterialButton;
55
#elif WINDOWS
66
using PlatformView = Microsoft.UI.Xaml.Controls.Button;
7-
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID)
7+
#elif TIZEN
8+
using PlatformView = Tizen.UIExtensions.ElmSharp.Button;
9+
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID && !TIZEN)
810
using PlatformView = System.Object;
911
#endif
1012

src/Core/src/Handlers/Button/IButtonHandler.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using PlatformView = Google.Android.Material.Button.MaterialButton;
55
#elif WINDOWS
66
using PlatformView = Microsoft.UI.Xaml.Controls.Button;
7-
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID)
7+
#elif TIZEN
8+
using PlatformView = Tizen.UIExtensions.ElmSharp.Button;
9+
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID && !TIZEN)
810
using PlatformView = System.Object;
911
#endif
1012

@@ -16,4 +18,4 @@ public partial interface IButtonHandler : IViewHandler
1618
new PlatformView PlatformView { get; }
1719
ImageSourcePartLoader ImageSourceLoader { get; }
1820
}
19-
}
21+
}

src/Core/src/Handlers/Image/IImageHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using PlatformView = Android.Widget.ImageView;
55
#elif WINDOWS
66
using PlatformView = Microsoft.UI.Xaml.Controls.Image;
7-
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID)
7+
#elif TIZEN
8+
using PlatformView = Tizen.UIExtensions.ElmSharp.Image;
9+
#elif NETSTANDARD || (NET6_0 && !IOS && !ANDROID && !TIZEN)
810
using PlatformView = System.Object;
911
#endif
1012

0 commit comments

Comments
 (0)