C
C#9mo ago
Kai

❔ DataContext & UserControl

How can I set the DataContext of a usercontrol to a ViewModel, without creating a new instance of the VM each time the Control is loaded?
3 Replies
br4kejet
br4kejet9mo ago
A single view model shared across multiple controls? You can just create an instance of the VM somewhere and then just assign it to those user controls, or bind it to that single instance if you create the controls in XAML
Kai
Kai9mo ago
Yesn't.. I want to link a component across 2 different views
Accord
Accord9mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.