Provides various useful functions for painting operations
Namespace: Dapfor.Net.UiAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
public static class PaintHelper |
Visual Basic |
---|
Public NotInheritable Class PaintHelper |
Visual C++ |
---|
public ref class PaintHelper abstract sealed |
F# |
---|
[<AbstractClassAttribute>]
[<SealedAttribute>]
type PaintHelper = class end |
Examples
| Copy |
---|
public void CellCustomDraw(Grid grid)
{
grid.PaintCell += delegate(object sender, PaintCellEventArgs e)
{
Color startColor = Color.LightGray;
Color endColor = Color.LightSlateGray;
if (e.Cell.Row != null && e.Cell.Row.Selected)
{
startColor = PaintHelper.AlphaBlend(startColor, grid.Selection.Color);
endColor = PaintHelper.AlphaBlend(endColor, grid.Selection.Color);
}
Appearance appearance = new Appearance(SystemColors.GrayText, startColor, true, endColor, GradientDirection.Vertical);
e.Render.DrawCaption(appearance, ElementState.Normal, e.Cell.VirtualBounds, BorderSide.All, e.Graphics);
e.Parts &= e.Parts ^ (PaintPart.Background | PaintPart.Borders);
e.Appearance.ForeColor = Color.Yellow;
e.PaintAll();
};
} |
Inheritance Hierarchy
See Also