title: Listviewitem trims content
body: <p>I can't seem to solve this (WPF/c#).</p>
  
  <p>I have 2 windows, parent and child.</p>
  
  <p>In the parent window there's a listviewitem with an item.
  In the child window there's a textbox to choose the content( a string) of that item and the button "Create" to confirm that the strng in the textbox goes in the listviewitem, after which the child window closed.</p>
  
  <p>picture:<a href="http://yumenofufe.thealleycat.it/er2.png" rel="nofollow">enter link description here</a></p>
  
  <p>BUT, often when I click create the text gets trimmed. I cannot reproduce it, not even using the same name, which is weird.</p>
  
  <p>picture:<a href="http://yumenofufe.thealleycat.it/er3.png" rel="nofollow">enter link description here</a></p>
  
  <p>I'm using a listview because it has to look exactly the same as a listview near that which has many items.</p>
  
  <p>Here's the code from the "create" button.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//Here I put the name into the listview item and into a setting variable for future use.
  myparent.lstbcostum.Content = txtname.Text;
  Properties.Settings.Default.CostumName = txtname.Text;
                                                         
  //other code for saving other stuff
   var savepath = System.AppDomain.CurrentDomain.BaseDirectory + "\\Beats\\Costum";
  FileInfo myFile = new FileInfo(savepath + "A.wav");
  myFile.Attributes = FileAttributes.Normal;
  File.Copy(Globals_Costum.Beata, savepath + "A.wav", true);
  myFile = new FileInfo(savepath + "B.wav");
  myFile.Attributes = FileAttributes.Normal;
  File.Copy(Globals_Costum.Beatb, savepath + "B.wav", true);
  
  //other code for saving other stuff and saving settings
  Properties.Settings.Default.CostumFlag = true;
  myparent.lstbcostum.IsEnabled = true;
  Properties.Settings.Default.Save();
                                                               
  //Closing child                                              this.Close();                                               WpfApplication1.Window3.Globals_Beat.frmCostumOpened = false;</code></pre>
  </div>
  </div>
  </p>