title: Binding to a property within an instance
body: <p>I'm working on a project that is getting data from a backend, ie, the data is constantly changing dynamically, and the frontend shouldn't have to care.
  I need to expose this data to wpf such that someone can bind things to the data in wpf via expression blend. Readonly is fine. 
  In short, how do I do databinding to the property Foostring in a instance of a class "foo" of type "Foo" if my flow of control is roughly the following:</p>
  
  <pre class="lang-cs prettyprint-override"><code> public partial class Window1 : window
   {
        public Window1()
        {
             InitializeComponent();
             Foo foo = new foo;
        }
     // my text box is defined in the xaml of this window.
  
   }
  
  public ref class Foo
  {
       Foo()
      {
           FooProperty = "work,dammit";
      }
      private string _foostring="";
      public string FooProperty
      {
         get {return _foostring;}
          set {foostring=value;} 
  
      }
  }
  </code></pre>
  
  <p>I can get things to work if in the constructor of the Foo class I set binding on the text box, and if I inherit from INotifyPropertyChanged and raise an event on the setting of FooProperty.
  However, this does not expose this variable to expression blend--it's not really setting a datasource. I've tried to set the binding in xaml and it compiles but doesn't update.
  Any help would be greatly appreciated!</p>