C# Class SIL.Utils.PaintingHelper

Contains misc. static methods for various customized painting.
Mostra file Open project: sillsdev/FieldWorks

Public Properties

Property Type Description
WM_NCPAINT int

Public Methods

Method Description
CanPaintVisualStyle ( System.Windows.Forms.VisualStyles.VisualStyleElement element ) : bool

Returns a value indicating whether or not visual style rendering is supported in the application and if the specified element can be rendered.

DrawCustomBorder ( Control ctrl ) : void

Draws around the specified control, a fixed single border the color of text boxes in a themed environment. If themes are not enabled, the border is black.

DrawCustomBorder ( Control ctrl, Color clrBorder ) : void

Draws around the specified control, a fixed single border of the specified color.

DrawHotBackground ( Graphics g, Rectangle rc, PaintState state ) : void

Draws a background in the specified rectangle that looks like a toolbar button when the mouse is over it, with consideration for whether the look should be like the mouse is down or not. Note, when a PaintState of normal is specified, this method does nothing. Normal background painting is up to the caller.

Private Methods

Method Description
GetParent ( IntPtr hWnd ) : IntPtr
GetWindowDC ( IntPtr hwnd ) : IntPtr
PaintDropDownContainer ( IntPtr hwnd, bool returnGraphics ) : Graphics
ReleaseDC ( IntPtr hwnd, IntPtr hdc ) : int

Method Details

CanPaintVisualStyle() public static method

Returns a value indicating whether or not visual style rendering is supported in the application and if the specified element can be rendered.
public static CanPaintVisualStyle ( System.Windows.Forms.VisualStyles.VisualStyleElement element ) : bool
element System.Windows.Forms.VisualStyles.VisualStyleElement
return bool

DrawCustomBorder() public static method

Draws around the specified control, a fixed single border the color of text boxes in a themed environment. If themes are not enabled, the border is black.
public static DrawCustomBorder ( Control ctrl ) : void
ctrl System.Windows.Forms.Control
return void

DrawCustomBorder() public static method

Draws around the specified control, a fixed single border of the specified color.
public static DrawCustomBorder ( Control ctrl, Color clrBorder ) : void
ctrl System.Windows.Forms.Control
clrBorder Color
return void

DrawHotBackground() public static method

Draws a background in the specified rectangle that looks like a toolbar button when the mouse is over it, with consideration for whether the look should be like the mouse is down or not. Note, when a PaintState of normal is specified, this method does nothing. Normal background painting is up to the caller.
public static DrawHotBackground ( Graphics g, Rectangle rc, PaintState state ) : void
g System.Drawing.Graphics
rc System.Drawing.Rectangle
state PaintState
return void

Property Details

WM_NCPAINT public_oe static_oe property

public static int WM_NCPAINT
return int