I am trying to add a watermark for a TextBox. The TextBox.Background is a System.Windows.Media.Brush. I need the Graphics.FillRectangle(System.Drawing.Brush....)
Is there any way to convert the mediea brush to the drawing brush?
Try with this
System.Drawing.Brush b = new System.Drawing.SolidBrush((System.Drawing.Color)new System.Drawing.ColorConverter().ConvertFromString(new System.Windows.Media.BrushConverter().ConvertToString(mediabrush)));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With