Xamarin 2.3.3 : My converter isn't working due to a sealed class

tematimtematim FRMember ✭✭

Hello,

This is my converter :
public class NullableBoundsTypeConverter : BoundsTypeConverter { public override object ConvertFromInvariantString(string value) { Rectangle? rec = (Rectangle)base.ConvertFromInvariantString(value); return rec; } }

Since the 2.3.3 update, a sealed keyword is present, so I can't use it.

I want to use some fixs inside this release, so do you have a workaround about my is issue ?

Regards

Posts

  • StephaneDelcroixStephaneDelcroix USInsider, Beta ✭✭✭✭
    edited November 2016

    if you can inherit, compose.

    public class NullableBoundsTypeConverter : TypeConverter
    {
        public override object ConvertFromInvariantString(string value)
        {
            var boundsTypeConverter = new BoundsTypeConverter();
            Rectangle? rec = (Rectangle) boundsTypeConverter.ConvertFromInvariantString(value);
            return rec;
        }
    }
    
  • tematimtematim FRMember ✭✭

    Thanks for your help

Sign In or Register to comment.