Search Framework:
PenBrushFactory
Namespace: WealthLab.WPF
Parent: Object

PenBrushFactory is a static class that can return WPF Pen and Brush objects that are styled to the currently selected WL8 Theme. Additionally, the Pens and Brushes are cached so that multiple requests for the same objects will not incur unnecessary processing.

Brushes
BackgroundBrush
public static SolidColorBrush BackgroundBrush

Returns a SolidColorBrush using the background color of the currently selected WL8 Theme.


ForegroundBrush
public static SolidColorBrush ForegroundBrush

Returns a SolidColorBrush using the foreground color of the currently selected WL8 Theme.


GetBrush
public static Brush GetBrush(WLColor color)

Returns a WPF SolidColorBrush using the specified color.


GreenTextBrush
public static SolidColorBrush GreenTextBrush

Returns a SolidColorBrush for rendering green text in the currently selected WL8 Theme.


ProfitBrush
public static SolidColorBrush ProfitBrush(double profit)

Returns a SolidColorBrush based on the specified profit parameter value. Negative values will return a red colored Brush, positive a green, and zero a gray.


RedTextBrush
public static SolidColorBrush RedTextBrush

Returns a SolidColorBrush for rendering red text in the currently selected WL8 Theme.



Colors
BackgroundColor
public static WLColor BackgroundColor

Returns the background color of the currently selected WL8 Theme.


ForegroundColor
public static WLColor ForegroundColor

Returns the foreground color of the currently selected WL8 Theme.


GreenColor
public static WLColor GreenColor

Returns a WLColor that corresponds to a green that can be rendered in the currently selected WL8 Theme.


RedColor
public static WLColor RedColor

Returns a WLColor that corresponds to a red that can be rendered in the currently selected WL8 Theme.



Pens
GetPen
public static Pen GetPen(WLColor color, double thickness = 1.0, LineStyle ls = LineStyle.Solid)
public static Pen GetPen(WLColor color, LineStyle ls)

The first method signature returns a WPF Pen using the specified color. You can optionally specify a thickness and line style (ls parameter.)

The second method signature returns a WPF Pen using the specified color and line style (ls parameter) with a thickness of 1.