Set the data context at the Window.DataContext level instead of in Window.Resources