Friday, 6 September 2013

What is WPF equivalent of Windows Forms Region.Xor in Paint event?

What is WPF equivalent of Windows Forms Region.Xor in Paint event?

I'm trying to move this WF code on WPF, but there is not Paint event.
private void OnPaint(object sender, PaintEventArgs e) { var region = new
Region(new Rectangle(0, 0, this.Width, this.Height)); var rectangle = new
Rectangle(0, 0, 50, 50); region.Xor(rectangle);
e.Graphics.FillRegion(Brushes.Black, region); }

No comments:

Post a Comment