internal MainStatusBar()
        {
            InitializeComponent();

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

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

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