internal MainStatusBar()
        {
            InitializeComponent();

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                DataContext = new MainStatusBarDesignModel();
            }
            else
            {
                var mainWindow = (MainWindow)Application.Current.MainWindow;
                mainWindow.InitStatusBarViewModel();

                DataContext = mainWindow.StatusBarModel;
            }
        }
Exemple #2
0
        public void InitStatusBarViewModel()
        {
            if (StatusBarModel != null)
            {
                return;
            }

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                StatusBarModel = new MainStatusBarDesignModel();
            }
            else
            {
                StatusBarModel = new MainStatusBarViewModel();
            }
        }