How do I implement a custom Brush in WPF?
Posted
by MojoFilter
on Stack Overflow
See other posts from Stack Overflow
or by MojoFilter
Published on 2009-04-27T17:38:22Z
Indexed on
2010/03/18
21:21 UTC
Read the original article
Hit count: 347
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
}
© Stack Overflow or respective owner