Posted 27 September 2023, 5:28 pm EST
Hi Rob,
We are sorry to inform you that the exact path used for the default filter icon is not available for reference. However, we have tried to create the icon as close as possible to the default one. Please check the following code for the same:
base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
int x = r.Right - 22;
int y = r.Top + (r.Height/2 - 9);
Point[] funnelPoints = new Point[]
{
new Point(x+5, y),
new Point(x+10, y+5),
new Point(x+10, y+9),
new Point(x+12, y+9),
new Point(x+12, y+5),
new Point(x+17, y),
};
// Draw the funnel using a GraphicsPath
GraphicsPath funnelPath = new GraphicsPath();
funnelPath.AddPolygon(funnelPoints);
g.FillPath(Brushes.AntiqueWhite, funnelPath);
g.DrawPath(new Pen(Brushes.SlateGray, 1.2f), funnelPath);
GraphicsPath shadePath = new GraphicsPath();
shadePath.AddLine(new Point(x + 10, y+10), new Point(x + 12, y + 10));
g.DrawPath(new Pen(Brushes.Black, 1.2f), shadePath);
shadePath = new GraphicsPath();
shadePath.AddLine(new Point(x + 10, y + 8), new Point(x + 12, y + 8));
g.DrawPath(new Pen(Brushes.SlateGray, 1.4f), shadePath);
shadePath = new GraphicsPath();
shadePath.AddLine(new Point(x + 16, y + 1), new Point(x + 12, y + 5));
g.DrawPath(new Pen(Brushes.SlateGray, 1.6f), shadePath);
shadePath.AddLine(new Point(x + 17, y + 1), new Point(x + 13, y + 5));
g.DrawPath(new Pen(Brushes.Black, 0.8f), shadePath);
shadePath = new GraphicsPath();
Kindly refer to the updated sample for the same. (See CheckboxHeaderFilter_Mod2.zip)
Hope this helps!
Thanks & Regards,
Aastha