How do I set a ViewModel on a window in XAML using DataContext property?
- by Nicholas
The question pretty much says it all.
I have a window, and have tried to set the DataContext using the full namespace to the ViewModel, but I seem to be doing something wrong.
<Window x:Class="BuildAssistantUI.BuildAssistantWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="BuildAssistantUI.ViewModels.MainViewModel">