public SimulationSchematic(Circuit.Schematic Schematic) : base(Schematic) { InitializeComponent(); CommandBindings.Add(new CommandBinding(ApplicationCommands.Delete, Delete_Executed, Delete_CanExecute)); CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, SelectAll_Executed, SelectAll_CanExecute)); Focusable = true; Cursor = Cursors.Cross; Tool = new ProbeTool(this); int pad = Grid * 2; int align = Grid * 10; Circuit.Coord lb = Schematic.LowerBound; Circuit.Coord ub = Schematic.UpperBound; lb = Floor(lb - pad, align); ub = Ceiling(ub + pad, align); Width = ub.x - lb.x; Height = ub.y - lb.y; Origin = -lb; }