title: WPF DataGrids with same column width
body: <p>I have a WPF Window with 2 DataGrids, each DataGrids has 6 DataGridTextColumn columns. </p>
  
  <p>Only thing I like is once user OR system resize any column width on DataGrid #1, my app should set same column widths on DataGrid #2. </p>
  
  <p>First I thought I bind each column "Width" property and that's all, but according to these:</p>
  
  <p><a href="https://stackoverflow.com/questions/30241116/how-to-bind-datagrid-columns-width-in-wpf-mvvm">How to bind datagrid columns width in WPF (MVVM)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/9313586/binding-datagrid-column-width">Binding datagrid column width</a></p>
  
  <p>I was wrong.</p>
  
  <p>I tried that Rachel mentioned "Alternatively, you can define your own DataGridCellTemplate with a control that has it's Width bound to whatever the property is on your DataItem"</p>
  
  <p>but still no luck, column widths not updating at resizing.</p>
  
  <p>Also, I tried with this:
  <a href="http://dotnetgenetics.blogspot.hu/2016/04/wpf-datagridcell-resize-event.html" rel="nofollow noreferrer">http://dotnetgenetics.blogspot.hu/2016/04/wpf-datagridcell-resize-event.html</a></p>
  
  <p>At least I can catch resize event, but no idea how I can figure out that which DataGrid and which column sent this event to resize another DataGrid.</p>
  
  <p>I prefer a XAML-only solution if any.</p>
  
  <p>Could you help me please?</p>
  
  <p>It looks I found one solution:
  <a href="https://stackoverflow.com/questions/414310/wpf-datagrid-sync-column-widths?rq=1">WPF DataGrid Sync Column Widths</a></p>
  
  <p>So my working solution is:</p>
  
  <p>I handle LayoutUpdate event on both DataGrid, and I set new column widths like mentioned above by Ahmed Yasin Koçulu, but before I set new widths on DataGrid one, I unsubscribe LayouUpdate event on DataGrid two. When I finished setting new withd, I subcribe LayoutUpdate event again. </p>
  
  <p>I'd still prefer a XAML-only solution if any</p>