Inheritance: INotifyPropertyChanged
Example #1
0
        public GamePage()
        {
            this.InitializeComponent();

            _game = new GameViewModel();
            this.DataContext = _game;
        }
Example #2
0
        public MainPage()
        {
            this.InitializeComponent();

            _game = new GameViewModel();

            // Refresh scores after each game completes
            _game.GameCompleted += (s) =>
            {
                ReloadHistory();
            };

            this.GamePane.DataContext = _game;
        }