[Enhancement] Provide Migration guidance for Xamarin.Forms.Color #1668
Labels
area-docs
Conceptual docs, API docs, Samples
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
t/enhancement ☀️
New feature or request
Milestone
Summary
The Xamarin.Forms.Color struct seems to have been replaced by a combination of the Microsoft.Maui.Graphics.Color class and the Microsoft.Maui.Graphics.Colors class. Obviously these are quite different so some guidance is probably called for to deal with migration.
API Changes
If I had my druthers I think I lean toward the Xamarin.Forms approach of color as a struct rather than the MAUI approach of making it a pair of classes, mostly because I'm not sure reference semantics are appropriate and a color description doesn't take up much memory, but assuming there's a good reason to use classes instead of structs the main issues I see for people migrating code are:
If there's a blog post or something explaining why the model change to Color and Colors classes are desirable (certainly a switch to float from double to store RGBA values seems like it might perhaps save a bit of space) I'd appreciate it if someone could point me to it.
Intended Use Case
The proposed guidance would likely be needed whenever a code base with nontrivial uses of Xamarin.Forms.Color was being migrated.
The text was updated successfully, but these errors were encountered: