public override string ConvertToInvariantString(object value)
        {
            if (!(value is ColumnDefinitionCollection cdc))
            {
                throw new NotSupportedException();
            }
            var converter = new GridLengthTypeConverter();

            return(string.Join(", ", cdc.Select(cd => converter.ConvertToInvariantString(cd.Width))));
        }
Beispiel #2
0
        /// <include file="../../docs/Microsoft.Maui.Controls/RowDefinitionCollectionTypeConverter.xml" path="//Member[@MemberName='ConvertTo']/Docs" />
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (value is not RowDefinitionCollection rdc)
            {
                throw new NotSupportedException();
            }
            var converter = new GridLengthTypeConverter();

            return(string.Join(", ", rdc.Select(rd => converter.ConvertToInvariantString(rd.Height))));
        }
        public override string ConvertToInvariantString(object value)
        {
            if (!(value is RowDefinitionCollection rdc))
            {
                throw new NotSupportedException();
            }
            var converter = new GridLengthTypeConverter();

            return(string.Join(", ", rdc.Select(rd => converter.ConvertToInvariantString(rd.Height))));
        }