title: Binding and appendText result to a TextBox
body: <p>Total beginner in WPF so bear with me.</p>
  <p>I building a proof of concept application before I go ahead with it. I have decided to try building it using WPF first.</p>
  <p>This is the scenario:</p>
  <p>I have:</p>
  <ul>
  <li>a View=CustomerView  (userControl with a button &quot;Buy Products&quot;)</li>
  <li>a txtbox                    (append all the actions that occurs)</li>
  <li>ViewModel=CustomerViewModel (talks to the service etc.. and gets results</li>
  <li>Model =Customer    (simple class with properties with InotifyPropertyChanged implemented</li>
  </ul>
  <p>Given that I have a collection of products and for each product that I buy I need to APPEND TEXT TO the txtBox in the userControl printing all the actions that occurs, the textBox should look like</p>
  <blockquote>
  <pre><code>Start buying .....
  Product 1 Sold
  Product 2 Sold
  Fineshed....
  </code></pre>
  </blockquote>
  <p>My problem is that despite I notify successfully after each item is sold I cannot seem to see how I can bind or make &quot;Product 1 Sold,Product 2 appear in the textbox.</p>
  <p>In windows forms I would have a userControl with a property called ProductStatus and whenever notified I would appendText to the textBox.
  &quot;I put beginInvoke as I was getting threadCross operation&quot; when coming from a service. That is another problem that I will have to investigate</p>
  <pre><code>private ProductStatus _productStatus;
  public ProductStatus Status
  {
    get { return _productStatus; }
    set
    {
      _printStatus = value;                 
      BeginInvoke((MethodInvoker)(() =&gt; txtProductResult.AppendText(string.Format(&quot;Product Sold {0}&quot;, Environment.NewLine))));  
    }
  }
  </code></pre>
  <p>How do I append text to myTextBox for each item I sell?</p>
  <p>=================Added current code===============================</p>
  <pre><code>    void LogChanged(object sender, NotifyCollectionChangedEventArgs e) 
          { 
              foreach(object item in e.NewItems) 
              { 
                  txtProduct.AppendText(item.ToString()); 
              } 
          } 
          
           &lt;TextBox Margin=&quot;12,41,12,59&quot; Name=&quot;txtPrintResult&quot; /&gt;
         &lt;TextBox Text=&quot;{Binding TicketPrintLog, Mode=OneWay}&quot; Margin=&quot;12,41,12,12&quot; /&gt;
         
         
              ProductModel
              =============
               public string ProductLog{ get; set; }
                
                
              ProductViewModel
              ==================
              public string ProductLog
              {
                  get { return _ProductModel.ProductLog; }
              }   
              internal void AppendToProductLogText(string text)
              {
                  _ProductModel.ProductLog += text + Environment.NewLine;
                  OnPropertyChanged(&quot;ProductLog&quot;);
              } 
              
              void ProductSoldNotificationReceived(object sender, notificationEventArgs e)
              {
                  //THIS FIRES WHENEVER I PRODUCT IS SOLD.
                  AppendToProductLogText(e.Message);
               }
              
              ProductView (userControl) XAML
              ================================
              &lt;TextBox Margin=&quot;12,41,12,59&quot; Name=&quot;txtResult&quot; Text=&quot;{Binding ProductLog, Mode=OneWay}&quot; /&gt;  
              
              IN CODE BEHIND I DO
                
                public void Action1()
                {
                  txtResult.AppendText(_productViewModel.ProductLog);
                }
                 public void SellProductAction()
                {
                  txtResult.AppendText(_productViewModel.ProductLog);
                }
  </code></pre>
  <p>The problem i have is that i still have todo this</p>
  <pre><code>        txtResult.AppendText(_productViewModel.ProductLog); 
  </code></pre>
  <p>which defeats the point on databinding also when executing SellproductAction I only get notified about the last item, it doesn't append Product1 sold, Product 2 sold etc…</p>
  <p>Any ideas?</p>