-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix AutomationProperties.Name binding errors for HintAssist.Hint #3946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AutomationProperties.Name binding errors for HintAssist.Hint #3946
Conversation
|
|
||
| namespace MaterialDesignThemes.Wpf.Converters; | ||
|
|
||
| public class ObjectToStringConverter : IValueConverter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot rename this to AutomationPropertiesNameConverter and move to the internal namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Renamed to AutomationPropertiesNameConverter and moved to the Internal namespace in commit 9619ddc.
…ndings Co-authored-by: Keboo <[email protected]>
Co-authored-by: Keboo <[email protected]>
…nd move to Internal namespace Co-authored-by: Keboo <[email protected]>
Registers the 'convertersInternal' XML namespace in the DatePicker, NumericUpDown, and TimePicker theme dictionaries.
9e6071d to
8aeb89c
Compare
Problem
AutomationProperties.Name binding errors were occurring in MaterialDesign controls (NumericUpDown, TextBox, ComboBox, etc.) when
HintAssist.Hintcontained non-string values. SinceHintAssist.Hintis of typeobject, binding it directly toAutomationProperties.Name(which expects astring) caused WPF binding errors in the output window.Solution
Created a new
AutomationPropertiesNameConverterin the Internal namespace that safely converts any value to a string for use with AutomationProperties.Name bindings:The converter was applied to all AutomationProperties.Name bindings that reference HintAssist.Hint across the theme files.
Changes
New Files
Modified Files
Applied the converter to 8 AutomationProperties.Name bindings in 7 XAML theme files:
Example Change
Before:
After:
Impact
Fixes #3941
Original prompt
Fixes #3945
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.