HorizontalOptions="Center" doesnt work on UWP

Below code works fine on Android but when I test on UWP, SfRating aligns always at start, not in center.

 <ContentPage.Resources>
        <ResourceDictionary>
            <Style x:Key="frmStyle" TargetType="Frame">
                <Setter Property="OutlineColor" Value="Silver"/>
                <Setter Property="HasShadow" Value="true"/>
                <Setter Property="Padding" Value="1"/>
                <Setter Property="Margin" Value="5,5"/>
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>
    <Frame Style="{StaticResource frmStyle}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"  >
        <StackLayout Orientation="Vertical" >
            <Label Text="Ratings" InputTransparent="True"  HorizontalOptions="Center" FontSize="Micro" TextColor="Black" FontAttributes="Bold" />

            <rating:SfRating x:Name="rating" ReadOnly="True" VerticalOptions="Center" InputTransparent="True"   BackgroundColor="White"
                                                     TooltipPlacement="BottomRight"  TooltipPrecision="2" 
                                                         Value="2" Precision="Half">
               
            </rating:SfRating>
        </StackLayout>
        <Frame.GestureRecognizers>
            <TapGestureRecognizer Tapped="AdnewRating"/>
        </Frame.GestureRecognizers>
    </Frame>

3 Replies

MS Mugundhan Saravanan Syncfusion Team March 13, 2018 12:59 PM UTC

Hi Emil,

Thanks for contacting Syncfusion support.

We have reproduced the issue “Control Alignment is not properly set as center in Xamarin.UWP”. Your requirement can be achieved by workaround using “HeightRequest” and “WidthRequest” Property. please find the attached sample from the below link.

Sample:  http://www.syncfusion.com/downloads/support/directtrac/general/ze/rating_sample_center-1960626535  

If you have further any concern, please contact us.
 

Regards,
Mugundhan S. 
  



EM Emil September 9, 2018 07:12 PM UTC

Hi,

This problem is also on Android now using the latest version. 
is there any breaking change?  


PA Paul Anderson S Syncfusion Team September 10, 2018 01:02 PM UTC

Hi Emil, 
 
We are able to reproduce the reported issue at our end in Android platform and logged a defect report. We will fix the issue and the fix will be included in our Volume 3 SP1 2018. Meanwhile can you please workaround by set the WidthRequest and HeightRequest property to make the control render in the center.  
 
 
Regards, 
Paul Anderson 


Loader.
Up arrow icon