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

Return a blank Label when LoadTemplate is null to prevent Hot Reload crashes #3692

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Dec 7, 2021

Fixes #2526

The parameterless constructor Hot Reload is using for DataTemplate doesn't set a LoadTemplate Func, so when anything tries to load up and run CreateContent it crashes.

This change just returns a blank Label rather than throwing an exception, so any Hot Reloaded content can display without crashing.

@hartez hartez changed the title Return a blank Label when LoadTemplate is null to prevent HotReload crashes Return a blank Label when LoadTemplate is null to prevent Hot Reload crashes Dec 7, 2021
@PureWeen
Copy link
Member

PureWeen commented Dec 8, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jsuarezruiz jsuarezruiz added the area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging label Dec 10, 2021
@rmarinho rmarinho merged commit c57858f into main Dec 14, 2021
@rmarinho rmarinho deleted the fix-2526 branch December 14, 2021 11:53
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2023
@samhouts samhouts added the fixed-in-6.0.200-preview.12 Look for this fix in 6.0.200-preview.12! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging fixed-in-6.0.200-preview.12 Look for this fix in 6.0.200-preview.12!
Projects
None yet
6 participants