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

No property, bindable property, or event found for 'FontSize'

Hello,

I try to change the font size of the X axys labels, but the XAML compiler returns me this error:

No property, bindable property, or event found for 'FontSize'

Here is my source code:

        <chart:SfChart.PrimaryAxis>
          <chart:CategoryAxis LabelPlacement="BetweenTicks" LabelsIntersectAction="MultipleRows" LabelRotationAngle="90"
                              EnableAutoIntervalOnZooming="False" Interval="1">
            <chart:ChartAxisLabelStyle TextColor="Red">
              <chart:ChartAxisLabelStyle.Font>
                <Font FontSize="20"/>
              </chart:ChartAxisLabelStyle.Font>
            </chart:ChartAxisLabelStyle>
          </chart:CategoryAxis>
        </chart:SfChart.PrimaryAxis>

How can I fix this?

5 Replies

GM Gobi M Syncfusion Team April 7, 2016 11:43 AM UTC

Hi Francisco,


Thanks for using Syncfusion Products.


We have analyzed your query and found that you have missed the <chart:CategoryAxis.LabelStyle> tag in your code. Please find the working code below.


<chart:SfChart.PrimaryAxis>
          <chart:CategoryAxis LabelPlacement="BetweenTicks" LabelsIntersectAction="MultipleRows" LabelRotationAngle="90" EnableAutoIntervalOnZooming="False" Interval="1">

            <chart:CategoryAxis.LabelStyle>
              <chart:ChartAxisLabelStyle TextColor="Red">
              <chart:ChartAxisLabelStyle.Font>
                <Font FontSize="20"/>
              </chart:ChartAxisLabelStyle.Font>
            </chart:ChartAxisLabelStyle>
            </chart:CategoryAxis.LabelStyle>

      </chart:CategoryAxis>

</chart:SfChart.PrimaryAxis> 



Please let us know, if you have any query.


Regards,

Gobi M 



MD Marco Dal Prato January 15, 2020 09:18 AM UTC

I've the same problem with the build 17.4.0.41: (Visual Studio 2019)

This is my XAML code:

                    <chart:SfChart.PrimaryAxis>
                        <chart:CategoryAxis>
                            <chart:CategoryAxis.LabelStyle>
                                <chart:ChartAxisLabelStyle>
                                    <chart:ChartAxisLabelStyle.Font>
                                        <Font FontSize="20" />
                                    </chart:ChartAxisLabelStyle.Font>
                                </chart:ChartAxisLabelStyle>
                            </chart:CategoryAxis.LabelStyle>
                        </chart:CategoryAxis>
                    </chart:SfChart.PrimaryAxis>

Compiling the solution I get this error message:
    Position 137:47. No property, bindable property, or event found for 'FontSize', or mismatching type between value and property.   

The row 17 is the FontSize assignation.

Thanks in advance for any help.
Marco





GR Geetha Rajendran Syncfusion Team January 16, 2020 04:17 PM UTC

Hi Marco,

 

We would like to let you know that FontProperty is obsolete as of version 16.1.0.24. So, you can use the FontSize, FontFamily and FontAttributes properties instead of Font to achieve your requirement.

 

Code snippet [XAML]:

<chart:SfChart.PrimaryAxis>

    <chart:CategoryAxis>

        <chart:CategoryAxis.LabelStyle>

            <chart:ChartAxisLabelStyle FontSize="20">

            </chart:ChartAxisLabelStyle>

        </chart:CategoryAxis.LabelStyle>

    </chart:CategoryAxis>

</chart:SfChart.PrimaryAxis>

 

Reference link - https://help.syncfusion.com/xamarin/release-notes/v16.1.0.24?type=all#sfchart-breaking-changes

 

Please get back to us for further assistance.

 

Thanks,

Geetha R



MD Marco Dal Prato January 17, 2020 09:10 AM UTC

In this way it works fine !!

Thanks for the very fast answer.

Marco


HM Hemalatha Marikumar Syncfusion Team January 20, 2020 05:22 AM UTC

Hi Marco, 
 
Thanks for your update. 
 
We are glad to hear that given solution works. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Hemalatha M. 


Loader.
Up arrow icon