title: Simple XAML binding in a textblock text
body: <p>I have a <code>TextBlock</code> control inside a <code>HubSection</code> in a Windows 8.1 Universal app.</p>
  
  <pre><code>&lt;TextBlock x:Name="api_enabled_label"
          DataContext="{Binding RelativeSource={RelativeSource Self}}"
          Text="{Binding APIinfotext}" /&gt;
  </code></pre>
  
  <p>Now when the page is launched, in the contrustor, there is a method that is run.</p>
  
  <pre><code>public string APIinfotext { get; set; }    
  
  public sealed partial class MainPage : Page {
  
      VoipMS voip_service = new VoipMS("shoukatali@hotmail.com", "Kitt0cat");
  
      public string APIinfotext { get; set; }
  
      public MainPage() {
          this.InitializeComponent();
          // disable sections until API is enabled
          mainpagehub.Sections[1].IsEnabled = false;
          mainpagehub.Sections[2].IsEnabled = false;
          //check for API and enable sections            
          checkAPI();
      }
  
      private async void checkAPI() {
          //irrelevant code above
          switch (result) {
              case "success":                        
                  APIinfotext = "Your API is connected";                        
                  break;
          //irrelevant code below
          }
      }
  </code></pre>
  
  <p>So why dosnt this work? I set the DataContext of the Textblock to the current class (which is the MainPage partial class) and the property is a public property. </p>
  
  <p>Note: Today is my first time working with .net 4.5 with XAML after a huge break at the .net 2.0 framework with WinForms.</p>