Parent: Object
The PenBrushFactory class is a static utility that creates and caches WPF Pen and Brush objects. It also exposes colors and brushes derived from the currently selected WL9 Theme. Repeated requests for the same WLColor-based Brush or the same Pen definition reuse cached objects instead of creating new instances.
Returns the Brush used for Building Block backgrounds in the currently initialized WL9 Theme.
Returns the Brush used for Building Block condition elements in the currently initialized WL9 Theme.
Returns the Brush used for Building Block long-entry elements in the currently initialized WL9 Theme.
Returns the Brush used for Building Block long-exit elements in the currently initialized WL9 Theme.
Returns the Brush used for Building Block qualifier elements in the currently initialized WL9 Theme.
Returns the Brush used for Building Block short-entry elements in the currently initialized WL9 Theme.
Returns the Brush used for Building Block short-exit elements in the currently initialized WL9 Theme.
Returns a WPF Brush for the specified color. The returned Brush is cached, so subsequent calls using the same WLColor return the existing Brush instance.
Returns a WPF Pen using the specified color. The first overload optionally lets you specify the Pen's thickness and line style. The second overload creates a Pen using the specified color and ls with a thickness of 1. The supported LineStyle values are rendered as follows:
- Solid - Solid line.
- Dotted - Uses WPF DashStyles.Dot.
- Dashed - Uses WPF DashStyles.Dash. Pen instances are cached according to their color, thickness, and line style.
Initializes the theme-dependent colors and brushes exposed by PenBrushFactory using resources from the specified WPF Window. This method initializes the red, green, yellow, foreground, background, Building Block, and blue status brushes. If the Window is null or does not contain the expected RedText resource, the method returns without initializing the properties.
Returns a theme-aware Brush based on the specified profit value.
- A positive value returns GreenTextBrush.
- A negative value returns RedTextBrush.
- Zero returns ForegroundBrush.
Returns the blue status text Brush from the currently initialized WL9 Theme. It is used by WL9 for status rendering such as the Strategy Monitor.
Returns the background SolidColorBrush of the currently initialized WL9 Theme.
Returns the foreground SolidColorBrush of the currently initialized WL9 Theme.
Returns the green text SolidColorBrush of the currently initialized WL9 Theme.
Returns the red text SolidColorBrush of the currently initialized WL9 Theme.
Returns the yellow text SolidColorBrush of the currently initialized WL9 Theme.
Returns the background color of the currently initialized WL9 Theme.
Returns the foreground color of the currently initialized WL9 Theme.
Returns the green text color of the currently initialized WL9 Theme.
Returns the red text color of the currently initialized WL9 Theme.
Returns the yellow text color of the currently initialized WL9 Theme.