title: How to add new rows at top programmatically in WPF grid (.NET5)
body: <p>I am using WPF with .NET5 to develop a Windows app where I am using Grid to display some content, and I need to programmatically add a new row at the top of the grid.</p>
  <p>One method I considered is modifying row number of each existing row but it's a tedious task. I am using grid to display the content as grid expands dynamically with the expansion of the main window whereas as far as I know, other containers do not show this behavior.</p>
  <p>Another method I considered is inserting a row using gridName.Childern.Insert() but it inserts and overlaps the existing row.</p>
  <p>I need a solution to either dynamically add a new row at top of the grid without overlapping or to make other containers such as Stack Panel and Dock Panel expand while maximizing the main window.</p>
  <p>Is there any other efficient way of achieving this functionality?</p>