title: WPF: Open Calendar like DatePicker in popup
body: <p>I have a DataGrid and want to use a <code>Calender</code> in one cell. I know a way to make the <code>Calender</code> look like a MonthPicker, that is why I chose this class.</p>
  
  <pre><code>&lt;DataGridTemplateColumn&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TextBlock Text="{Binding EinsatzAb, StringFormat=d}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.CellTemplate&gt;
      &lt;DataGridTemplateColumn.CellEditingTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Calendar DisplayMode="Year" SelectedDate="{Binding EinsatzAb}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.CellEditingTemplate&gt;
  &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>The problem is that the <code>Calendar</code> is not opened in a popup but in the DataGrid cell.</p>
  
  <p><a href="https://i.stack.imgur.com/GT7Gl.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GT7Gl.gif" alt="datagrid"></a></p>
  
  <p>How to make it open in a popup like DatePicker?</p>