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

Update get-started-counter-csharp-mvux.md #18679

Closed
wants to merge 1 commit into from

Conversation

JohannesMP
Copy link

@JohannesMP JohannesMP commented Nov 4, 2024

  • The MainModel section walks you through the creation of MainModel.cs which defines the partial record MainModel.
  • However the DataBinding section only refers to MainViewModel which is never defined.

This PR renames MainViewModel references in the DataBinding section to be MainModel, as the examples would not compile otherwise.


Alternatively if the intent was to use MainViewModel then the MainModel section should be updated accordingly instead.

@CLAassistant
Copy link

CLAassistant commented Nov 4, 2024

CLA assistant check
All committers have signed the CLA.

@Kunal22shah
Copy link
Contributor

@JohannesMP these renames aren't necessary. The the MainViewModel that is used for dataContext is auto generated using the new MVUX v3 generator see here : Upgrading Extensions Reactive Version
and : https://platform.uno/docs/articles/external/workshops/simple-calc/modules/MVUX-CSharp/04-App%20Architecture/README.html#binding-to-properties-in-the-ui

Which is different from the MainModel, this is the default now, so all new Uno Apps should have this
[assembly: Uno.Extensions.Reactive.Config.BindableGenerationTool(3)] in GlobalUsings
and the app would compile.

if it's not compiling on your side then maybe you aren't on the later sdk versions where this was added. Let me know if I can help you with more info on the same : )

@Kunal22shah Kunal22shah closed this Nov 4, 2024
@JohannesMP
Copy link
Author

@JohannesMP these renames aren't necessary. The the MainViewModel that is used for dataContext is auto generated using the new MVUX v3 generator see here : Upgrading Extensions Reactive Version and : https://platform.uno/docs/articles/external/workshops/simple-calc/modules/MVUX-CSharp/04-App%20Architecture/README.html#binding-to-properties-in-the-ui

Which is different from the MainModel, this is the default now, so all new Uno Apps should have this [assembly: Uno.Extensions.Reactive.Config.BindableGenerationTool(3)] in GlobalUsings and the app would compile.

if it's not compiling on your side then maybe you aren't on the later sdk versions where this was added. Let me know if I can help you with more info on the same : )

Thank you for clarifying!

In that case I would recommend that the sample/tutorial app docs should mention this.

Right now it just says "Now that we have the MainViewModel class ..." after creating MainModel.
image

@jeromelaban
Copy link
Member

Indeed, the name of the class in DataBinding is incorrect, it was fixed here: #18708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants