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

Proposal: Add OldValue to DataContextChangedEventArgs #9394

Open
bjorn-malmo opened this issue Mar 4, 2024 · 0 comments
Open

Proposal: Add OldValue to DataContextChangedEventArgs #9394

bjorn-malmo opened this issue Mar 4, 2024 · 0 comments
Labels
feature proposal New feature proposal team-Markup Issue for the Markup team

Comments

@bjorn-malmo
Copy link

When DataContextChanged occurs, it would be really helpful to be able to access to old datacontext, since Unloaded/Loaded events cannot be used to manage state (these appears to be async and not deterministic in order. See Issue 1900)

Rationale

In order to manage state and resource allocation within ViewModels, it would be helpful to have access to the unloaded Datacontext. The workaround, to have a local reference to the current datacontext, adds unnecessary code and complexity.

This would be completely backwards compatible and probably quite easy to implement.

@bjorn-malmo bjorn-malmo added the feature proposal New feature proposal label Mar 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Mar 4, 2024
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Mar 4, 2024
@bpulliam bpulliam added the team-Markup Issue for the Markup team label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

2 participants