title: Auto size ListView height when ListView item gets modified
body: <p>I have been having some issues resizing my list view row to match the text inside of it.  Also I have read a lot of documentation and everything seems to point toward using <code>HasUnevenRows</code>, which I am using  but isn't quite what I need.</p>
  <p>I have a <code>ListView</code> which I allow the user to modify contents of this row using <code>Rg.Popups</code> and context actions. Essentially the user swipes and clicks Edit and they get pushed to a popup where they can edit the list view item.</p>
  <p>When the note gets updated it also gets updated on my <code>ListView</code> however if the note is more than 1 line the row will not resize. I have to leave the page and come back to it for the row to resize to fit the entire note.</p>
  <p>Below is my code.</p>
  <pre><code>  &lt;ListView  x:Name=&quot;MyItemList&quot;
                         HorizontalOptions=&quot;Center&quot;
                         ItemSelected=&quot;OpenRecipeDetails&quot;
                         IsGroupingEnabled=&quot;True&quot;
                         HasUnevenRows=&quot;true&quot;&gt;
                  &lt;ListView.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ViewCell x:Name=&quot;myViewcell&quot;&gt;
                              &lt;ViewCell.ContextActions&gt;
                                  &lt;MenuItem Clicked=&quot;MenuItem_Clicked&quot; Text=&quot;Edit Note&quot; CommandParameter=&quot;{Binding .}&quot;/&gt;
                              &lt;/ViewCell.ContextActions&gt;
                              &lt;StackLayout&gt;
                                  &lt;Grid&gt;
                                      &lt;Grid.ColumnDefinitions&gt;
                                          &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
                                      &lt;/Grid.ColumnDefinitions&gt;
                                      &lt;Grid.RowDefinitions&gt;
                                          &lt;RowDefinition Height=&quot;Auto&quot; /&gt;
                                          &lt;RowDefinition Height=&quot;Auto&quot; /&gt;
                                      &lt;/Grid.RowDefinitions&gt;
                                      &lt;Label Text=&quot;{Binding Title}&quot;
                                              Grid.Row=&quot;0&quot;
                                              Grid.Column=&quot;0&quot;
                                              FontSize=&quot;{Binding BindingContext.H1Font, Source={x:Reference Name=ThisPage}}&quot;
                                              Padding=&quot;5&quot;
                                              
                                              LineBreakMode=&quot;WordWrap&quot;&gt;
                                      &lt;/Label&gt;
                                      &lt;Label Text=&quot;{Binding sNote}&quot;
                                             Grid.Row=&quot;1&quot;
                                             Grid.Column=&quot;0&quot;  
                                             FontSize=&quot;{Binding BindingContext.H2Font, Source={x:Reference Name=ThisPage}}&quot;
                                            &gt;
                                      &lt;/Label&gt;
                                  &lt;/Grid&gt;
                                 &lt;!-- --&gt;
                              &lt;/StackLayout&gt;
                          &lt;/ViewCell&gt;
  
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
               &lt;/ListView&gt;
  </code></pre>
  <p>CodeBehind</p>
  <pre><code>//for editing the note
   async void MenuItem_Clicked(System.Object sender, System.EventArgs e)
          {
              var menuItem = sender as MenuItem;
              updatedItem = menuItem.CommandParameter as MyItemBooklet;
              await PopupNavigation.Instance.PushAsync(new EditNotesPopupPage(updatedItem));
          }
  </code></pre>
  <p>EditNotesPopupPage</p>
  <pre><code> public EditNotesPopupPage( MyItemBooklet item)
          {
              InitializeComponent();
              _item = item;
          }
  ...
    async void Cancel_Clicked(System.Object sender, System.EventArgs e)
          {
              await PopupNavigation.Instance.PopAllAsync();
          }
  
         async void Ok_Clicked(System.Object sender, System.EventArgs e)
          {
             ...
             ...
  
              await db.UpdateNote(text, _item.iRecipeLinkID);
              await PopupNavigation.Instance.PopAllAsync();
          }
  </code></pre>