Replies: 3 comments 1 reply
-
That seems like a good idea. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have created a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looks good! Released as v1.2.1. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If we had additional methods to get a view for an already existing viewmodel, we could replace the existing view location to get the view from the container for a given view model rather than create through reflection.
I imagine the new methods to support this could be implemented something like this:
That way I can add the following to my application:
module Root =
let lazyInstance= lazy AppCompositionRoot()
let public current = lazyInstance.Value
In my App,axaml.fs
instead of
let appRoot = MyAppComppsite()
I would have
let appRoot = Root.current
And then my ViewLocator() class implementing IDataTemplate could also call Root.current to get the view for a given view model so that it can be statically instantiated in the zaml is it is currently.
Beta Was this translation helpful? Give feedback.
All reactions