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

Assign ViewModels as DataContext to created Views in MVVM templates #238

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

MalzSmith
Copy link
Contributor

Usually when you try to get a specific Control based on a ViewModel, you want the VM to be assigned to the View as its DataContext.

@Takoooooo
Copy link
Contributor

May you add that feature support for F# MVVM template. Otherwise LGTM

@MalzSmith
Copy link
Contributor Author

@Takoooooo I've added the F# implementation. My experience with F# is minimal, please make sure to review it 😅

@MalzSmith MalzSmith changed the title Assign VM as DataContext to created views in ViewLocator.cs [WIP] Assign VM as DataContext to created views in ViewLocator.cs Nov 8, 2023
@MalzSmith MalzSmith changed the title [WIP] Assign VM as DataContext to created views in ViewLocator.cs Assign ViewModels as DataContext to created Views in MVVM templates Nov 8, 2023
@Takoooooo Takoooooo merged commit 66f3823 into AvaloniaUI:master Nov 13, 2023
3 checks passed
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