Xamarin.forms: [Bug] iOS ImageButton has wrong size when used vector source

Created on 12 Dec 2019  路  3Comments  路  Source: xamarin/Xamarin.Forms

Description

After upgrade to XF 4.4.0.991265 on iOS Image button with vector image source has wrong size

Steps to Reproduce

  1. Create new project with Xamarin.Forms 4.2.0.709249
  2. Add ImageButton with vector image source (pdf)
  3. Upgrade to Xamarin.Forms 4.4.0.991265

Expected Behavior

Image button will have same size as image with same source

Actual Behavior

Image button will have NOT same size as image with same source

Basic Information

  • Version with issue: 4.4.0.991265
  • Last known good version: 4.3.0.991221
  • IDE: Visual Studio Community 2019 for Mac Version 8.3.11 (build 1)
  • Platform Target Frameworks: iOS

    • iOS: 13.3

  • Nuget Packages:
    Xamarin.Forms 4.4.0.991265
    Xamarin.Essentials 1.3.1

Screenshots

iOS XF 4 2

iOS XF 4 4

Reproduction Link

https://github.com/kuzub/ImageButtonIssue

imagebutton 3 regression iOS 馃崕 bug

Most helpful comment

@kuzub did you try on renderer?:

Control.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
Control.VerticalAlignment = UIControlContentVerticalAlignment.Center;

All 3 comments

@kuzub did you try on renderer?:

Control.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
Control.VerticalAlignment = UIControlContentVerticalAlignment.Center;

Reproduces as described.

Was this page helpful?
0 / 5 - 0 ratings