XLabs Xamarin Forms Labs – Label does not un-strikethrough in Android



If you are trying to use un-strike-through (remove strike through) a text in extended label of XLabs Xamarin-Forms-Labs , you may not see it working. This is a bug.

To fix it, I have added to else part in both in ExtendedLabelRenderer.cs of Android platform. This fixes it.

  if (view.IsUnderline)
        {
            control.PaintFlags = control.PaintFlags | PaintFlags.UnderlineText;
        }else
        {
            control.PaintFlags &= ~PaintFlags.UnderlineText;
 
        }
 
        if (view.IsStrikeThrough)
        {
            control.PaintFlags = control.PaintFlags | PaintFlags.StrikeThruText;
        }else
        {
            control.PaintFlags &= ~PaintFlags.StrikeThruText;
        }

Thanks.



Leave a Reply

Your email address will not be published. Required fields are marked *