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

v4: Static View Models #494

Closed
40 of 41 tasks
marner2 opened this issue Jun 27, 2022 · 3 comments
Closed
40 of 41 tasks

v4: Static View Models #494

marner2 opened this issue Jun 27, 2022 · 3 comments
Milestone

Comments

@marner2
Copy link
Collaborator

marner2 commented Jun 27, 2022

Here is a summary of the "Static View Models" feature being added to v4.

Remaining work (3-31-2023):

And of course:

  • Modify documentation to mention this method of construction.

There are fundamentally two parts to this push. The first is to allow statically-defined view model types to work with Elmish, and the second is to allow the properties of those view model types to be statically typed.

From a discussion with @TysonMN about the advantages of statically typed properties:

When used in the context of "dot" notation in the XAML project, you will be able to get compile-time help for things like ViewModelProp.SubModel.Prop. If those were constrained to obj, you wouldn't get compile-time checking of those types.
Also XAML will warn you about type issues (number vs string, etc)

In addition, allowing statically-defined view model types will enable users to call out these view model types by name. This will allow things like data templates with explicit DataTypes set.

@marner2
Copy link
Collaborator Author

marner2 commented May 2, 2023

#552 is technically beyond the scope of "Static View Models," which is now feature complete.

I think we're ready to add documentation for it. @LyndonGingerich if you're interested.

@marner2
Copy link
Collaborator Author

marner2 commented May 12, 2023

#520 this documentation can resume.

@marner2
Copy link
Collaborator Author

marner2 commented Nov 7, 2023

This is now completed

@marner2 marner2 closed this as completed Nov 7, 2023
@marner2 marner2 added this to the 4.0 milestone Nov 8, 2023
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

No branches or pull requests

1 participant