private void DrawArea() { if (Area == null) { return; } var bound = Area.InitBound; if (bound.MaxX == 0) { bound.SetMinMaxXY(); } PropertyGrid1.SelectedObject = bound; ListBox1.ItemsSource = null; ListBox1.ItemsSource = Area.GetPoints(); ListBox2.ItemsSource = null; ListBox2.ItemsSource = Area.GetAbsolutePoints(); BoundCanvas1.Show(bound); //pcCenter.X=bound. pcSize.X = bound.GetSizeX(); pcSize.Y = bound.GetSizeY(); pcCenter.X = bound.GetCenterX(); pcCenter.Y = bound.GetCenterY(); }
private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { BoundCanvas1.RefreshBound(); }
private void ListBox1_SelectionChanged(object sender, SelectionChangedEventArgs e) { var point = ListBox1.SelectedItem as Point; BoundCanvas1.SelectPoint(point); }