Quantcast
Viewing all articles
Browse latest Browse all 79144

Button.Image - Sizing of button to size of image not working in IOS

Really simple problem. Android will properly set the size of the Button to the size of the Image.
iOS does not. Is this a known issue? Setting the LayoutOptions of the Button doesn't change anything either.

        _btnSearch.Image = new Button();
        _btnSearch.Image = ImageSource.FromFile("search.png") as FileImageSource;

        this.Content = new StackLayout
        {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Children =
            {
                    _btnSearch
            }
        };

Viewing all articles
Browse latest Browse all 79144

Trending Articles