title: Binding the text property of the text block in a StatusBar from different pages
body: <p>I have a WPF application which has a MainWindow which is divided into 2 frames one for the left navigation menu and the other for the pages (like addFirm page , addlocation page etc). Now i want a status bar on the main window which must display messages which are raised in the pages. Something like this </p>
  
  <pre><code>&lt;DockPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" LastChildFill="True"  &gt;
      &lt;StackPanel DockPanel.Dock="Top" Style="{DynamicResource SMMainStackPanel}" &gt;
          &lt;Border Style="{DynamicResource SMBorder}"  &gt;
            &lt;Label Content="System" FontSize="18" HorizontalContentAlignment="Center" /&gt;
          &lt;/Border&gt;
      &lt;/StackPanel&gt;
      &lt;StackPanel DockPanel.Dock="Left" Style="{DynamicResource SMMainStackPanel}"&gt;
          &lt;Border VerticalAlignment="Stretch" Style="{DynamicResource SMBorder}"  &gt;
              &lt;Frame Name="frame1" Source="Menu.xaml" Style="{DynamicResource SMMainFrame}" /&gt;
          &lt;/Border&gt;
      &lt;/StackPanel&gt;
      &lt;StackPanel Style="{DynamicResource SMMainStackPanel}" &gt;
         &lt;Border Style="{DynamicResource SMBorder}" &gt;                
              &lt;Frame Name="frame2" Style="{DynamicResource SMMainFrame}"/&gt;
          &lt;/Border&gt;
          &lt;DockPanel  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DockPanel.Dock="Bottom"&gt;
                     &lt;StatusBar&gt;
                      &lt;StatusBar.ItemsPanel&gt;
                          &lt;ItemsPanelTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;Grid.RowDefinitions&gt;
                                      &lt;RowDefinition Height="*"/&gt;
                                  &lt;/Grid.RowDefinitions&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="4*"/&gt;
                                      &lt;ColumnDefinition Width="Auto"/&gt;
                                      &lt;ColumnDefinition Width="*"/&gt;
                                      &lt;ColumnDefinition Width="*"/&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                              &lt;/Grid&gt;
                          &lt;/ItemsPanelTemplate&gt;
                      &lt;/StatusBar.ItemsPanel&gt;
                      &lt;StatusBarItem&gt;
                          &lt;TextBlock&gt;Ready&lt;/TextBlock&gt;
                      &lt;/StatusBarItem&gt;
                      &lt;StatusBarItem Grid.Column="1"&gt;
                          &lt;ProgressBar Value="30" Width="80" Height="18"/&gt;
                      &lt;/StatusBarItem&gt;
                      &lt;StatusBarItem Grid.Column="2"&gt;
                      &lt;TextBlock Text= "ABC" /&gt;
                      &lt;/StatusBarItem&gt;
                      &lt;StatusBarItem Grid.Column="3"&gt;
              &lt;TextBlock Text="{Binding Source={x:Static sys:DateTime.Now}}"/&gt;
                      &lt;/StatusBarItem&gt;
                  &lt;/StatusBar&gt;
          &lt;/DockPanel&gt;
      &lt;/StackPanel&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>Now i want to populate the StatusBarItem from the message property of the below class instead of the static text "ABC". PS: The obejct of this class is created on the indivisual pages and not on the mainwindow</p>
  
  <pre><code>public class StatusHelper : INotifyPropertyChanged 
  {
      public event PropertyChangedEventHandler PropertyChanged;
      private string _message;
  
      private void OnPropertyChanged(String property)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(property));
          }
      }
  
      public string Message
      {
          get
          {
              return _message;
          }
          set
          {
              _message = value;
              OnPropertyChanged("Message");
          }
      }
  
  }
  </code></pre>
  
  <p>I create the object of this class on the indivisual pages and then when an operation is completed then how i set the message property of this class.</p>
  
  <p>The only link which i am missing is that how do i get the instance of this class which is set on a page (say suppose on addlocation) on the mainwindow.xaml. Also how do i bind this instance on the text property of the text area.</p>