public void GetViewBounds() { UndoMgr undomgr = new UndoMgr(5); EventDB eventDB = new EventDB(undomgr); SymbolDB symbolDB = new SymbolDB(Util.GetFileInAppDirectory("symbols.xml")); eventDB.Load(TestUtil.GetTestFile("courseview\\sampleevent1.coursescribe")); eventDB.Validate(); CourseView courseView = CourseView.CreateViewingCourseView(eventDB, CourseDesignator.AllControls); RectangleF bounds = courseView.GetViewBounds(); Assert.AreEqual(-51.4F, bounds.Left); Assert.AreEqual(-47.8F, bounds.Top); Assert.AreEqual(106.9F, bounds.Width); Assert.AreEqual(92.9F, bounds.Height, 0.0001); courseView = CourseView.CreateViewingCourseView(eventDB, new CourseDesignator(CourseId(4))); Assert.AreEqual(new RectangleF(-51.4F, -39F, 96.8F, 84.1F), courseView.GetViewBounds()); courseView = CourseView.CreateViewingCourseView(eventDB, new CourseDesignator(CourseId(5))); Assert.AreEqual(new RectangleF(-51.4F, -39F, 106.9F, 84.1F), courseView.GetViewBounds()); }