public static Rectangle2D GetBounds(DependencyObject o) { return (Rectangle2D)o.GetValue(BoundsProperty); } private static void OnBoundsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)