Answer the question
In order to leave comments, you need to log in
How to split XAML code?
Is it possible to somehow split a large XAML code into several view files? I even saw it somewhere already, i.e. is done for each UserControl view. But most importantly, what will happen to the binding? Because if you specify the same ViewModel as the DataContext everywhere, then a new Instance will still be created for each view ... Is it possible to somehow intercept the parent instance of the DataContext?
Answer the question
In order to leave comments, you need to log in
The DataContext descends from above anyway, you don't need to do anything extra for this.
You can bind controls to the DataContext of the parent control. Google the ElementName parameter of the binding
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question