public CalibrationWindow() { //this.DataContext = TrackingScreen.TrackingScreenBounds; InitializeComponent(); visualPoint = new VisualGazePoint(); // Get tracking-screen size Left = TrackingScreen.TrackingScreenLeft; Top = TrackingScreen.TrackingScreenTop; Width = TrackingScreen.TrackingScreenWidth; Height = TrackingScreen.TrackingScreenHeight; ExportCalibrationResults = false; // Hide menues and stuff calibrationMenu.Visibility = Visibility.Collapsed; sharingUC.Visibility = Visibility.Collapsed; calibrationMenu.OnAccept += AcceptCalibration; calibrationMenu.OnShare += ShareData; calibrationMenu.OnRecalibrate += RedoCalibration; calibrationMenu.OnToggleCrosshair += ToggleCrosshair; calibrationMenu.OnToggleSmoothing += ToggleSmoothing; calibrationMenu.OnAccuracyParamsChange += AccuracyParamsChange; sharingUC.OnDataSent += sharingUC_OnDataSent; KeyDown += Calibration_KeyDown; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.CanvasRoot = ((System.Windows.Controls.Canvas)(target)); return; case 2: this.visualGazePoint = ((GazeTrackerUI.Calibration.VisualGazePoint)(target)); return; } this._contentLoaded = true; }