title: MVVM Textbox binding, updating data from Model
body: <p>I have been battling with moving my application to MVVM. 
  I am trying to binding many text boxes from some data via MVVM.</p>
  
  <p>Model:</p>
  
  <pre><code>public class XMLItems 
  {
  string input;
  public string Input
      {
          get { return input; }
          set { input = value; }
      }
  }
  </code></pre>
  
  <p>ViewModel</p>
  
  <pre><code> public ViewModel() //Translates ICommands to methods
      {
             _ items = new XMLItems { Input = "" };
      }
  
      XMLItems _items;
      public XMLItems Items
      {
          get
          {
              return _items;
          }
          set
          {
              _items = value;
          }
      }
  
      public string Input
      {
          get { return Items.Input; }
          set
          {
              if (Items.Input != value)
              {
                  Items.Input = value;
                  OnPropertyChanged("Input");
              }
          }
      } 
  
      public void ChangeInput(object obj)
      {
          Input = "123";
      }
  
      void OnPropertyChanged(string propertyName)
      {
          PropertyChangedEventHandler handler = this.PropertyChanged;
          if (handler != null)
              handler(this, new PropertyChangedEventArgs(propertyName));
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  </code></pre>
  
  <p>So that all works. when the <code>ChangeInput</code> function is fired, the text updates <code>123</code>.</p>
  
  <p>But what I need to do, is update my text from my Model where all the code logic is, and this happens in several places from in my app (updating the text). But this doesn't seem to work.
  for example, if I fire:</p>
  
  <pre><code>public void ChangeText()
      {
          Input = "456";
      }
  </code></pre>
  
  <p>...in my Model, it doesn't update the text?</p>
  
  <p>I cant seem to find other examples like this? Am I going about it wrong?</p>