title: How do I trigger a style change if DataContext is null or not using WPF
body: <p>I have a page with several controls. The controls are bound to display values which they get from the page's DataContext. What I would like to do is display another look of the page should the DataContext be null. In some cases the controls of the page should display differently if "their" property is set or not.</p>
  
  <p>Is is possible to create a binding to see if the DataContext is set?</p>
  
  <p>What I did as a workaround was to add a IsDataContextSet property to the page and the specify a binding like:</p>
  
  <pre><code>Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}, Path=IsDataContextSet}" Value="false"
  </code></pre>
  
  <p>This works as I expect but I have a feeling that their is more elegant way to do this. Or at least or more WPFish way.</p>