void RectangleWidthChanged(object sender, DependencyPropertyEventArgs e) { myPen.Width = (float)myRectangleWidth.Value; if (!myFilled.Value) WindowlessControlHost.WindowlessInvalidate(this); }