I'm trying to control the size of the legend icons using the LegendItemIconSize property. It seems to work fine on Android and UWP but not on iOS.
Is this a bug or a limitation?
Is there any way to work around this, perhaps with a custom renderer?
6 Answers, 1 is accepted
I have tested the behavior but could not observe the issue in iOS. Have in mind that the LegendItemIconSize is of type Size so you need to set such and providing a numeric value in XAML would not work. Here is a simple approach I am testing with:
Please give it a try. If you still experience any issues, providing more details on your setup will be appreciated so we can investigate the issue at our end.
Thank you for trying to help Stefan. I tried your suggestion but it did not help.
I should've attached some sample code from the beginning but figured it should be easy to recreate this issue with the char demo. Perhaps there's something about my code that's special. Anyway, here's the sample code that mirrors my scenario.
Code behind and view model
Hope this helps. I'm using the latest Telerik controls with the latest Xamarin forms. The screenshots were taken in an iOS 11.4 simulator running the 6S skin. However, I also observed this behaviour on a real iOS device.
I am not sure which other issue you are referring to? Maybe it was not properly submitted, please create a new thread so we can check it as well.
As for the IconSize, setting the size after the control is loaded should work for you. Please give it a try:
And attaching to the event:
Thank you Stefan, setting the legend icon size after the native control is loaded worked for me.
If this is the expected behavior I would suggest updating the documentation to make it clear that simply setting these attributes in XAML will not work. Ideally though, your code could be enhanced to hide this (iOS specific?) implementation detail...
I have logged the behavior as a bug in the iOS implementation of the legend. You can track it here - RadChart: [iOS]Setting the icon size of the Legend items before the control is loaded is not respected. I have updated your account's points balance respectively.