How do I implement a custom Brush in WPF?
- by MojoFilter
Where can I find out enough info about how Brushes work to implement my own System.Windows.Media.Brush? I can handle all of the freezable baggage, but it's not really obvious what I need to override to get it to work.
Yeah, so I didn't mean that I want to use a predefined brush. I want to extend System.Windows.Media.Brush, which is an abstract class. This is all purely for my own edification. I'm not even sure what kind of brush I could make. I was just trying to learn how brushes work. As in:
public AwesomeBrush : Brush
{
protected override Freezable CreateInstanceCore()
{
return new AwesomeBrush();
}
... // concrete brush stuff
}