Exemplo n.º 1
0
        protected override XamlValueConverter <TypeConverter> LookupTypeConverter()
        {
            TypeConverter converter             = Descriptor.Converter;
            var           propertyTypeConverter = this.Type.TypeConverter;

            if (converter == null ||
                ConverterHelper.IsNonXaml(converter) ||
                (propertyTypeConverter != null && propertyTypeConverter.ConverterInstance == converter))
            {
                return(propertyTypeConverter);
            }
            return(new SpecifiedInstanceValueConverter(converter));
        }
Exemplo n.º 2
0
        protected override XamlValueConverter <TypeConverter> LookupTypeConverter()
        {
            TypeConverter converter = Descriptor.GetConverter();

            if (converter == null || ConverterHelper.IsNonXaml(converter))
            {
                if (ConverterHelper.HasXamlSpecificBuiltInConverter(UnderlyingType))
                {
                    return(base.LookupTypeConverter());
                }
                return(null);
            }
            return(new SpecifiedInstanceValueConverter(converter));
        }