-
Notifications
You must be signed in to change notification settings - Fork 121
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
MeasureToolbar
: modify ArgumentException
message
#539
Conversation
Any idea why the job might fail if the solution is building for me locally? |
All resolved - updated the certificate for UWP, changes included in this PR. |
DependencyProperty.Register(nameof(LineSketchEditor), typeof(SketchEditor), typeof(MeasureToolbar), new PropertyMetadata(null, OnLineSketchEditorPropertyChanged)); | ||
DependencyProperty.Register(nameof(LineSketchEditor), typeof(SketchEditor), typeof(MeasureToolbar), new PropertyMetadata(null, OnSketchEditorPropertyChanged)); | ||
|
||
private static void OnLineSketchEditorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | ||
private static void OnSketchEditorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
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.
Why this change? It's literally the 'LineSketchEditor' property. Please undo
@@ -631,26 +625,7 @@ private static void OnLineSketchEditorPropertyChanged(DependencyObject d, Depend | |||
/// Identifies the <see cref="AreaSketchEditor"/> dependency property. | |||
/// </summary> | |||
public static readonly DependencyProperty AreaSketchEditorProperty = | |||
DependencyProperty.Register(nameof(AreaSketchEditor), typeof(SketchEditor), typeof(MeasureToolbar), new PropertyMetadata(null, OnLineSketchEditorPropertyChanged)); |
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.
This is the only bug. It should call OnAreaSketchEditorPropertyChanged instead, and don't delete the code below.
This reverts commit ea7aae9.
When registering the
DependencyProperty
s forLineSketchEditor
andAreaSketchEditor
, they are both using the same method for thePropertyMetadata
PropertyChangedCallback
parameter. This is fine, but currently the exception message when the new value is null doesn't make sense forAreaSketchEditor
. To remedy this, I would like to remove the unused method and modify the currently used method to make sense in both cases.Also, I removed some redundant "using" statements and corrected a typo.