title: WPF - Bind to MainViewModel property from modal
body: <p>It is easy to bind to a property in MainViewModel (MVM) from a button to manipulate whether it is enabled or not:</p>
  
  <pre><code>&lt;Button IsEnabled="{Binding Path=IsUSBInserted}"/&gt;
  </code></pre>
  
  <p>However, I have a modal pop up (new Window). I would like a button in the pop up window to be controlled by the IsUSBInserted property in MVM as well. Is this possible? </p>
  
  <p>Here's what I am trying to do conceptually (in the pop up XAML):  1) is it possible   2) if so, what is correct syntax as this does not seem to be working.  Thank you.</p>
  
  <pre><code>&lt;Window xmlns:mainViewModel="clr-namespace:Acme.MainApp.ViewModel"&gt;
  
  &lt;Button IsEnabled="{Binding Path=mainViewModel.IsUSBInserted}"/&gt;
  </code></pre>