Skip to content

Conversation

@Redth
Copy link
Member

@Redth Redth commented Jul 16, 2021

Forms used to define its own TypeConverter following the same convention of converting to/from an invariant string since netstandard1.x did not have the System.ComponentModel.TypeConverter.

This moves to using the standardized type which is expected more throughout the ecosystem.

TODO:

  • Bump MAUI Graphics version and use its ColorTypeConverter
  • Remove DesignTools ColorTypeConverter
  • Find a way to associate the attributes from the old ColorTypeConverter:
[Xaml.ProvideCompiled("Microsoft.Maui.Controls.XamlC.ColorTypeConverter")]
[Xaml.TypeConversion(typeof(Color))]
  • Look at TypeConverterAttribute in Controls and remove it
  • Remove need for KnownTypeConverters - this may mean moving some more converters to graphics/core from controls
  • Infer TypeConversionAttribute from context ??
  • drop IExtendedTypeConverter, use TypeConverter.ConvertFrom overload
  • What to do with UriTypeConverter ?

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

[Xaml.ProvideCompiled("Microsoft.Maui.Controls.XamlC.BindablePropertyConverter")]
[Xaml.TypeConversion(typeof(BindableProperty))]
public sealed class BindablePropertyConverter : TypeConverter, IExtendedTypeConverter
public sealed class BindablePropertyConverter : StringTypeConverterBase, IExtendedTypeConverter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as ITypeDescriptorContext is a IServiceProvider, we probably could get rid of IExtendedTypeConverter (that adds a IServiceProvider parameter)

Redth and others added 10 commits July 21, 2021 07:38
Forms used to define its own TypeConverter following the same convention of converting to/from an invariant string since netstandard1.x did not have the `System.ComponentModel.TypeConverter`.

This moves to using the standardized type which is expected more throughout the ecosystem.
@Redth Redth force-pushed the improve-xaml-editing branch from b91792c to b975eb0 Compare July 21, 2021 11:38
@Redth Redth added this to the 6.0.100-preview.7 milestone Jul 21, 2021
@Redth
Copy link
Member Author

Redth commented Jul 21, 2021

Added converters into Maui Graphics: dotnet/Microsoft.Maui.Graphics#126
Once merged will remove them from MAUI on this PR

@mattleibow mattleibow merged commit c248bda into main Jul 26, 2021
@mattleibow mattleibow deleted the improve-xaml-editing branch July 26, 2021 21:30
@samhouts samhouts added area-xaml XAML, CSS, Triggers, Behaviors area-architecture Issues with code structure, SDK structure, implementation details labels Jul 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-architecture Issues with code structure, SDK structure, implementation details area-xaml XAML, CSS, Triggers, Behaviors fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants