Skip to content
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] TransitioningContentControl crushes when a view attaches visual tree many times #259

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

AuroraZiling
Copy link
Collaborator

Related Issue: #258

What Happened:

When adding some items after emptying the SukiSideMenu, it can cause TransitioningContentControl to crash if those added items ever appear.

Possible Causes:

The Views that were found to be causing the problem had their VisualParent in the TransitioningContentControl's PushContent() function not empty, but either FirstBuffer or SecondBuffer. because the VisualParent was reassigned to another Buffer when it was not empty, this would cause a crash.

Unhandled exception. System.InvalidOperationException: 
The control UotanToolbox.Features.Home.HomeView (Content = WrapPanel) 
already has a visual parent ContentPresenter (Name = PART_FirstBufferControl) 
while trying to add it as a child of ContentPresenter (Name = PART_SecondBufferControl).

I don't know if there will be any side effects from this pr, but this solves the problem

@kikipoulet kikipoulet merged commit 9f4e3c6 into kikipoulet:main Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants