-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Output better XAML errors #4466
Labels
Comments
Another from gitter: https://gitter.im/AvaloniaUI/Avalonia?at=5f32b56eb103e45c830e2c2d |
Maybe add warning support as well? For example, |
"Unable to find the parent scope for AvaloniaProperty lookup" error can add a hint about where TemplateBinding can be used. And recommendation to use Bindings instead: |
This too: #16144 |
This too #16580 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Avalonia XAML error messages are sometimes less than ideal. This can be a big issue particularly for new users as the error messages tend to confuse more than help. Here's a few problems with them:
CanCopy
/CanCut
/CanPaste
/CanRedo
/CanUndo
being modified #12218Some examples follow. This list isn't exhaustive but shows some of the more common errors:
Missing property
Invalid XAML
Avalonia
WPF
Evaluation
Avalonia.Controls:Avalonia.Controls.Button
is overkill:Button
would sufficeBetter Error Message
Missing Event Handler
Invalid XAML:
Avalonia:
WPF:
Evaluation
netstandard:System.String
is overkillSystem.EventHandler``1<Avalonia.Interactivity.RoutedEventArgs>
isn't particularly useful for new usersClick
is an eventBetter Error Message
Unable to find suitable handler for event 'Button.Click'. Valid handler signature is 'void Button_Click(object sender, RoutedEventArgs e)'.
Invalid value
Invalid XAML:
Avalonia:
WPF:
Evaluation
UnsetValueType
/IBinding
isn't very useful as this obviously isn't a bindingBetter Error Message
'Foo' is not a valid value for 'HorizontalAlignment'.
The text was updated successfully, but these errors were encountered: