-
Notifications
You must be signed in to change notification settings - Fork 5
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
Vertical alignment of nested label is not working #21
Comments
That works as expected. You forced RowHeight="50". ok Add VerticalOption="Fill" to your Grid to obtain what you want. |
No, the same issue here (I've already tried that):
The blue color is the background of Grid |
Your Grid will take the same height as your Label. So it's expected. |
But the height is different. Do you see blue and yellow backgrounds? |
I'm not sure of what I see. The blue is not aligned with the yellow on the right. If that was the same control, their right side would be aligned. At least the yellow won't go farther than the blue. Could you provide a full repro project ? |
Works perfectly. code: <wheelPickerForms:WheelPicker
ItemsSourceMulti="{Binding WheelOptions.ItemsSource}"
SelectedItemsIndex="{Binding WheelOptions.SelectedItemsIndex}"
HorizontalOptions="Fill">
<wheelPickerForms:WheelDefinition Width="Auto" HorizontalOptions="Center" Alignment="Center" RowHeight="50">
<DataTemplate>
<Grid BackgroundColor="Red">
<Label VerticalOptions="Center" Text="{Binding .}" TextColor="Black" HorizontalOptions="Center" FontSize="Body" />
</Grid>
</DataTemplate>
</wheelPickerForms:WheelDefinition>
</wheelPickerForms:WheelPicker> |
Are you on iOS or Android ? It seems the issue exist and happens on iOS only. A workaround is to use <wheelPickerForms:WheelDefinition Width="Auto" HorizontalOptions="Center" /> |
There is no way to create data template with vertically centered label:
The label remains on top. I want this because there is no way to change size of element without DataTemplate
The text was updated successfully, but these errors were encountered: