title: WPF iterate through datagrid
body: <p>Using WPF C#.NET4.5 using visual studio 2012 ulti.</p>
  
  <p>Old winforms code:</p>
  
  <pre><code>foreach (DataGridViewRow paretoRow in ParetoGrid.Rows)
  {
         if ((Convert.ToInt32(paretoRow.Cells["CurrentPareto"].Value) &lt; (Convert.ToInt32(paretoRow.Cells["NewPareto"].Value))))
         {
                paretoRow.Cells["pNew"].Value = downArrow
         }
  }
  </code></pre>
  
  <p>As you can see each row I cycle through I check a specific cell, if true I then populate another cell.  This was good old winforms code I used many times before...however.
  Switching over to WPF was alot more different than i previously assumed.</p>
  
  <p><code>DataGrid</code> does not contain the <code>Row</code> property.  Instead, I think you need to use:</p>
  
  <pre><code>DataGridRow paretoRow in paretogrid.Items
  </code></pre>
  
  <p>But im still at a loss on who to now get the cell. </p>
  
  <p>So my question is, is there syntax changes to perform, if so where?  Or as I'm beginning to believe datagrids in WPF operate with Objects more so than winforms thus not needing to use a propertie called "row", if this is the case what logic/syntax should i know use in this example?</p>
  
  <p>Thanks for your patience guys, think when I go home for the bank holiday I'll do a bit of WPF digging to see how different it actually is.</p>