Esempio n. 1
0
        public MainPageViewModel()
        {
            var presenter = (Bxf.IPresenter)Bxf.Shell.Instance;

            presenter.OnShowError += (message, caption) =>
            {
                MessageBox.Show(message, caption, MessageBoxButton.OK);
            };

            presenter.OnShowStatus += (status) =>
            {
            };

            presenter.OnShowView += (view, region) =>
            {
                if (region == "Content")
                {
                    MainContent.Add(view.ViewInstance);
                    while (MainContent.Count > 1)
                    {
                        MainContent.RemoveAt(0);
                    }
                }
            };

            if (!DesignerProperties.IsInDesignTool)
            {
                ListPersons();
            }
        }