Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect HorizontalOptions when using icon and text #60

Closed
esskar opened this issue Jul 26, 2018 · 3 comments
Closed

Respect HorizontalOptions when using icon and text #60

esskar opened this issue Jul 26, 2018 · 3 comments
Labels

Comments

@esskar
Copy link

esskar commented Jul 26, 2018

Describe the bug
Choosing HorizontalOptions="Start" aligns text-only buttons to the left, when adding an icon, everything is centered aligned again.

To Reproduce
<flex:FlexButton Text="Foo" Icon="Bar.png" HorizontalOptions="Start" />

Expected behavior
I would expect that icon and text are left aligned.

@mc-evgeny-zborovsky
Copy link

I have the same issue, however in my case I don't have an icon but just plain text. On iOS the text is aligned to the center even without setting the HorizontalOptions property. On Android the text is aligned to left, setting the HorizontalOptions is not working either.

<flexButton:FlexButton Grid.Row="1" CornerRadius="33" WidthRequest="300" HeightRequest="60" BackgroundColor="{StaticResource darkGreyBlue}" HorizontalOptions="CenterAndExpand" Text="Get started" FontFamily="{StaticResource MediumFont}" ClickedCommand="{Binding GetStartedCommand}" />

flex_txt

Using the latest and greatest XF and lib version.

@robinmanuelthiel
Copy link
Owner

Turns out, that it does respect the HorizontalOptions, when a HeightRequest is set. Strange, I will look into this!

@robinmanuelthiel
Copy link
Owner

Fixed in version 0.9.0: https://www.nuget.org/packages/Forms.Controls.FlexButton/0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants