More fixes
This commit is contained in:
@@ -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!;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user