I got the answer to this question. What i did was to pass on the instance of the main page to a common helper class(which is static) in a static variable . Now Create a property on the main page which would return the instance of the status bar (sbMain). Call the status helper class from the master forms and call the update method on it.
Add property SmStatusBar to the MainWindow also passthe instance to the main Window to a class while the initilization of the main page as below
public SmStatusBar StatusBar
{
get { return this.sbMain; }
}
public MainWindow()
{
InitializeComponent();
CommonHelper.SmMainWindow = this;
}
Add a static property on the Common Helper class
public static MainWindow MainWindow { get; set; }
Now Create a class StatusHelper
public static class StatusHelper
{
private static SmStatusBar _statusBar;
static StatusHelper()
{
_statusBar = CommonHelper.SmMainWindow.StatusBar;
}
public static bool UpdateStatus(string text)
{
_statusBar.UpdateStatusText(text);
return true;
}
}