-
Notifications
You must be signed in to change notification settings - Fork 94
Add Support For Expander In FindChild #624
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
base: main
Are you sure you want to change the base?
Conversation
} | ||
else if (element is ContentControl contentControl) | ||
{ | ||
if (element is Expander expander) |
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.
I'm not sure why Github is picking this up as changing the entire file. I only made some small additions to add cases for the Expander under ContentControl.
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.
Is it picking up line ending changes? I'm using VSCode and it should be picking up the editorconfig settings?
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.
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.
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.
Regardless of the formatting issue, I don't think we want to take this fix. I added a comment in the original issue, but Headers aren't children to the control.
If this is a scenario you need, you can use the predicate to find the parent container.
If we did do anything here, we'd probably want to generalize it to anything with a header, not just expander. And it'd be a new specific method that searches "everything" like FindChildOrHeader
} | ||
else if (element is ContentControl contentControl) | ||
{ | ||
if (element is Expander expander) |
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.
Fixes
Addresses #472
Adds support for searching an Expander control's header. The current logic only searches the content of the Expander control, but not the header.
PR Type
What kind of change does this PR introduce?
Bugfix
What is the current behavior?
Doesn't find framework elements in the header of an Expander control.
What is the new behavior?
Finds framework elements in the header of an Expander control.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
No tests. I believe the Logical Tree Tests are not being run (#474).