Skip to content

Implementing conversions from int to System.Windows.Media.Color for MaterialColorUtilities#3949

Merged
Keboo merged 3 commits into
MaterialDesignInXAML:masterfrom
MovGP0:master
Oct 31, 2025
Merged

Implementing conversions from int to System.Windows.Media.Color for MaterialColorUtilities#3949
Keboo merged 3 commits into
MaterialDesignInXAML:masterfrom
MovGP0:master

Conversation

@MovGP0

@MovGP0 MovGP0 commented Oct 11, 2025

Copy link
Copy Markdown
Contributor
  • Implemented conversion methods for colors given as int to System.Windows.Media.Color
  • Added unit tests for the conversion methods and for showcasing schema generation.

Notes:

  • System.Windows.Media.Color is not available when targeting Non-WPF (WinForms, MAUI, MacOS, Linux, etc.) plattforms. E.g. the following is not supported:
    • MAUI (Microsoft.Maui.Graphics.Color)
    • WinForms (System.Drawing.Color)
    • Splat (Splat.SplatColor)
  • The current methods do not easily support the scenario that the user wants to pick secondary/tertiary/error/panel colors manually. We may want to implement custom factories for this purpose.
  • I've added a dependency to Shouldly to implement multi-asserts properly

@MovGP0

MovGP0 commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

ℹ️ The follwoing changes where ammended:

  • Added a factory method for creating dynamic color schemes with colors that can be overriden by the user

Comment thread src/MaterialDesign3.MaterialColorUtilities/MaterialColorUtilities.csproj Outdated
@MovGP0

MovGP0 commented Oct 24, 2025

Copy link
Copy Markdown
Contributor Author

ℹ️ The follwoing changes where ammended:

  • removed conditional WPF checks.

@Keboo Keboo enabled auto-merge (squash) October 31, 2025 05:52
@Keboo Keboo merged commit 3c2a7bc into MaterialDesignInXAML:master Oct 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants