More fixes

This commit is contained in:
2026-01-17 08:06:22 +00:00
parent f1a368a6c2
commit dc52f7f2bc
18 changed files with 1022 additions and 65 deletions

View File

@@ -27,6 +27,8 @@ public partial class ImageButtonHandler : ViewHandler<IImageButton, SkiaImageBut
["BackgroundColor"] = MapBackgroundColor,
[nameof(IView.Width)] = MapWidth,
[nameof(IView.Height)] = MapHeight,
["VerticalOptions"] = MapVerticalOptions,
["HorizontalOptions"] = MapHorizontalOptions,
};
public static CommandMapper<IImageButton, ImageButtonHandler> CommandMapper = new(ViewHandler.ViewCommandMapper)
@@ -184,6 +186,26 @@ public partial class ImageButtonHandler : ViewHandler<IImageButton, SkiaImageBut
}
}
public static void MapVerticalOptions(ImageButtonHandler handler, IImageButton imageButton)
{
if (handler.PlatformView is null) return;
if (imageButton is Microsoft.Maui.Controls.ImageButton imgBtn)
{
handler.PlatformView.VerticalOptions = imgBtn.VerticalOptions;
}
}
public static void MapHorizontalOptions(ImageButtonHandler handler, IImageButton imageButton)
{
if (handler.PlatformView is null) return;
if (imageButton is Microsoft.Maui.Controls.ImageButton imgBtn)
{
handler.PlatformView.HorizontalOptions = imgBtn.HorizontalOptions;
}
}
// Image source loading helper
private ImageSourceServiceResultManager _sourceLoader = null!;