Posted 24 October 2017, 7:49 am EST
I have a custom cell that I am trying to center align within a column. I have set the HorizontalAlignment property to Center, but nothing seems to be happening.
This seems to work just fine:
<c1:GridColumn
HorizontalAlignment="Center"
Binding="MyColumn1" />
However, this does not:
<c1:GridColumn
HorizontalAlignment="Center">
<c1:GridColumn.CellTemplate>
<DataTemplate>
<Label
Text="Test" />
</DataTemplate>
</c1:GridColumn.CellTemplate>
</c1:GridColumn>
Setting HorizontalOptions on the Label doesn’t work either:
<c1:GridColumn
HorizontalAlignment="Center">
<c1:GridColumn.CellTemplate>
<DataTemplate>
<Label
HorizontalOptions="Center"
Text="Test" />
</DataTemplate>
</c1:GridColumn.CellTemplate>
</c1:GridColumn>
This appears to be a problem on UWP, but not Android. Not sure about iOS at this time. I am using FlexGrid version 2.4.20172.195 which as of the writing of this post is still pre-release.