[Enhancement] Replace some APIs with existing .NET ones #110
-
SummaryForms duplicated a lot of APIs due to limitations at the time. Now that more and more .NET is becoming available to all platforms, now is the time to drop those duplicate API's in favor of exising ones. API ChangesSystem.Maui.Color => System.Drawing.Color // perhaps Intended Use CaseReduce code maintenance within the Maui namespace and not duplicate API's unnecessarily. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Also System.Maui.Size -> System.Drawing.Size |
Beta Was this translation helpful? Give feedback.
-
That's the plan!! |
Beta Was this translation helpful? Give feedback.
-
Replacing Xamarin.Forms.Color with System.Drawing.Color would remove a lot of unnecessary duplication of code and conversions between two essentially identical types (8bpc). However the suggestion needs to be updated. There are plans to make MAUI depend on the 2D primitive graphics layer https://github.com/dotnet/Microsoft.Maui.Graphics, which is trememdous. This means that the Color type in MAUI will currently be Microsoft.Maui.Graphics.Color (16bpc). Assuming this is intentional and desirable, System.Drawing.Graphics is no longer a relevant proposal. Updated proposal for the Color type:The MAUI team and future users should push for adding a Color type to dotnet/runtime. There are two proposals there, an improved 8bpc Color type (minus some bad design choices of System.Drawing.Color) and a Microsoft.Maui and Microsoft.Maui.Graphics can then depend on one of these types. Presumably the 16bpc one to preserve the 16bpc of Microsoft.Maui.Graphics. |
Beta Was this translation helpful? Give feedback.
That's the plan!!