public LoginView()
 {
     InitializeComponent();
     App app = (App)System.Windows.Application.Current;
     ObjectDataProvider odp = (ObjectDataProvider)app.Resources["ChatModel"];
     _model = (ChatModel)odp.Data;
     _coordinator = app.getCoordinator();
 }
Пример #2
0
        public MainView()
        {
            InitializeComponent();
            App app = (App)System.Windows.Application.Current;
            ObjectDataProvider odp = (ObjectDataProvider)app.Resources["ChatModel"];
            app.getCoordinator().setMainView(this);
            _model = (ChatModel)odp.Data;

            // Disable the browse back command
            NavigationCommands.BrowseBack.InputGestures.Clear();
            if(!loadWindowsPrefs())
            {
                Width = 400;
                Height = 540;
                ChatUtils.locateOnScreen(this);
            }
        }