-
-
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
TemplatePart XAML diagnostics #14180
Conversation
Having it implemented in XAML compiler makes old Rider YouTrack issue unnecessary. Also, works in VS. |
You can test this PR using the following package version. |
A lot of good ideas here! It's also good someone else spent the time going through each TemplatePart. There were so many it's always easy to miss them.
This is a great idea!
I just followed WPF originally for this. So I have no strong feelings about it and generally think it is a good change. It matches the inheritance of other things related to controls: properties, etc.
Yea, since the parent can completely override the child's template part attributes there is less concern. Only in the case of a parent derived control not actually using a child template part would there be concern.
Awesome! This one was sorely needed and you found a good way to do it. Separately, I thought we need to review all
|
Thanks for adding this! I was literally asking for it just last week. Is there any plans for a reverse of this too, where a template has parts defined that don't match an attribute? |
...kup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlControlTemplatePartsChecker.cs
Show resolved
Hide resolved
You can test this PR using the following package version. |
I did, but there always a chance to miss something. |
Updated PR after review. It is ready again. |
You can test this PR using the following package version. |
What does the pull request do?
PART_ContentPresenter
is optional for Button - it will work without. ButPART_TextPresenter
is necessary for TextBox.Checklist
Breaking changes
New diagnostic errors might break projects. New errors should be either fixed or disabled with csproj/editorconfig settings.
Part of #13707
cc @robloo @danwalmsley