Platform windows.
Steps to reproduce:
- Enable visual styles
- Add a
RichTextBox with Dock = Fill, set BackColor to some value
- Run app
- Resize the form - grow
Expected behavior:
- After resizing the control is rendered correctly (border is fully rendered and back color is the one that was set via BackColor)
Actual result:
- After form has grown part of the RichTextBox border is missing
- BackColor is default color
Fixes:
- I added
XplatUI.SendMessage(Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero); to TextBoxBase.SetBoundsCore (maybe SetStyle(ControlStyles.ResizeRedraw, true) would suffice but I haven't tested that)
- Updated
ThemeVisualStyles.TextBoxBaseFillBackground to use base.TextBoxBaseFillBackground (textBoxBase, g, clippingArea) if back color is set:
if (!RenderClientAreas ||
!TextBoxBaseShouldPaint (textBoxBase) ||
textBoxBase.backcolor_set // <-- THIS condition
) {
base.TextBoxBaseFillBackground (textBoxBase, g, clippingArea);
return;
}
Platform windows.
Steps to reproduce:
RichTextBoxwith Dock = Fill, set BackColor to some valueExpected behavior:
Actual result:
Fixes:
XplatUI.SendMessage(Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero);toTextBoxBase.SetBoundsCore(maybeSetStyle(ControlStyles.ResizeRedraw, true)would suffice but I haven't tested that)ThemeVisualStyles.TextBoxBaseFillBackgroundto usebase.TextBoxBaseFillBackground (textBoxBase, g, clippingArea)if back color is set: