Skip to content

Add string-to-color binding converter#752

Merged
YukiMatsuzawa merged 1 commit into
masterfrom
copilot/yukimatsuzawa-sample-class-color-input
Jul 22, 2026
Merged

Add string-to-color binding converter#752
YukiMatsuzawa merged 1 commit into
masterfrom
copilot/yukimatsuzawa-sample-class-color-input

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

The sample class color editor needed to accept pasted color codes directly in the DataGrid cell, not just through the picker UI. This change moves that behavior into the binding layer so the grid can translate text input into a color value naturally.

What changed

  • Added a shared StringToColorConverter that formats Color values as strings and parses pasted text back into Color.
  • Wired the FileClassSetView DataGrid color cell to use the converter on CompositeColorPicker.SelectedColor.

Notes

  • Invalid text is ignored by returning Binding.DoNothing, which keeps the grid from throwing on bad paste input.
  • No picker-internal paste handling is needed for this flow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@YukiMatsuzawa
YukiMatsuzawa merged commit 8a8d7b5 into master Jul 22, 2026
9 checks passed
@YukiMatsuzawa
YukiMatsuzawa deleted the copilot/yukimatsuzawa-sample-class-color-input branch July 22, 2026 04:51
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.

1 participant