// Constructor public MainPage() { InitializeComponent(); connectionManager = new ConnectionManager(); connectionManager.MessageReceived += connectionManager_MessageReceived; stateManager = new StateManager(); }