- aliagha.huseynli
- Posts: 44
- Joined:
Multiple ViewModel Connections in NoesisView
Hi Noesis Team members,
I have a ViewModel cs file with Monobehavior, INotifyPropertyChange.
It contains all data-binding properties.
Now I want to separate it into multiple view models that can operate concurrently.
However, I've encountered a limitation with
which only permits a single view model connection.
How can I enable multiple view model connections simultaneously?
Thank you in advance for your assistance.
I have a ViewModel cs file with Monobehavior, INotifyPropertyChange.
It contains all data-binding properties.
Now I want to separate it into multiple view models that can operate concurrently.
However, I've encountered a limitation with
Code: Select all
NoesisView.Content.DataContext = this;
How can I enable multiple view model connections simultaneously?
Thank you in advance for your assistance.
-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: Multiple ViewModel Connections in NoesisView
Hi, what do you mean by "multiple view models that can operate concurrently"?
A View can only be connected to a single view model at the same time, but inside the View you can point to different properties to access several sub-view models:
Is this what you are trying to do?
A View can only be connected to a single view model at the same time, but inside the View you can point to different properties to access several sub-view models:
Code: Select all
<Grid DataContext="{Binding ModelA}">...</Grid>
<Grid DataContext="{Binding ModelB}">...</Grid>
<Grid DataContext="{Binding ModelC}">...</Grid>
- aliagha.huseynli
- Posts: 44
- Joined:
Re: Multiple ViewModel Connections in NoesisView
Yes. Thanks. It works :)
Who is online
Users browsing this forum: No registered users and 2 guests