We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SfAutoComplete cant control textsize on iOS

I have set the TextSize attribute to my SfAutoComplete, and it changes on my Android, however now that I am testing the the iOS version of the app I can set any number to my TextSize and the size doesnt change and I dont know why, I searched my code and nothing should be overwriting it.

XAML:

        <Frame
                HorizontalOptions="CenterAndExpand"
                VerticalOptions="CenterAndExpand"
                BorderColor="#e7e7e7"
                HasShadow="False"
                Padding="0,0,0,0"
                >



                        <autocomplete:SfAutoComplete  x:Name="miesto"
                        TextSize="12"
                        Margin="5,0,0,0"
                        TextColor="#1c1c1c"
                        ShowBorder="False"
                        FontFamily="Roboto-Regular.ttf#Roboto"
                        WidthRequest="100"
                        HorizontalOptions="CenterAndExpand"
                        />
                    </Frame>

3 Replies

MK Muneesh Kumar G Syncfusion Team April 11, 2019 09:40 AM UTC

Hi Chris,  
 
Greetings from Syncfusion. We have analyzed your query and we would like to inform you that while using the custom fonts in your application, you need to set different syntax for each OS.  
 
For iOS, we have to give the exact name of the file, without the extension. For Android we have to give the filename with the extension as per the below code snippet.  
 
Please use the font.ttf file code on the XAML code as mentioned below. 
  
 
<autocomplete:SfAutoComplete.FontFamily> 
           <OnPlatform x:TypeArguments="x:String"> 
                <On Platform="iOS" Value="Roboto-Regular" /> 
                <On Platform="UWP" Value="/Assets/Roboto-Regular.ttf#Roboto" /> 
                <On Platform="Android" Value="Roboto-Regular.ttf#Roboto" /> 
           </OnPlatform> 
 </autocomplete:SfAutoComplete.FontFamily>  
 
We have created a sample in SfAutoComplete as per the code snippet provided. Please have the sample for your reference. 
 
Please let us know if you have any concern about this. 
 
Thanks, 
Muneesh Kumar G. 



CH Chris April 11, 2019 12:21 PM UTC

Thank you, the provided solution works.

Greetings,

Chris.


MK Muneesh Kumar G Syncfusion Team April 11, 2019 12:33 PM UTC

Hi Chris, 
 
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Thanks, 
Muneesh Kumar G. 


Loader.
Live Chat Icon For mobile
Up arrow icon