IStyleProvider

References
public interface IStyleProvider
Interface for a style provider
Remarks: This can be used to create your own style engine to apply styles to widgets. The DefaultStyleProvider is a good example of how to implement a style provider.

Properties

Inherit

#
bool Inherit { get; }
Gets a value indicating whether this IStyleProvider allows inheriting styles from the parent object.
Remarks: This is used when applying cascading styles, sometimes the user or the provider will not want parent styles to be applicable.
true to inherit parent styles; otherwise, false.

Methods

ApplyCascadingStyle

#
void ApplyCascadingStyle(object container, object widget, string style)
Applies cascading styles to the specified widget.
Remarks: Cascading styles are applied on a widget when it is loaded onto a form, where styles are usually applied based on the container it is in.
container (object)Container that is applying styles. This can be the same as widget.
widget (object)Widget to apply the styles to.
style (string)Style to apply to the widget, usually a space delimited list of styles.

ApplyDefault

#
void ApplyDefault(object widget)
Applies default styling to the specified widget after creation.

ApplyStyle

#
void ApplyStyle(object widget, string style)
Applies styles to the specified widget
Remarks: This is used for global style providers when applying styles to a widget directly based on its style alone. This is usually applied when the style itself is updated.
widget (object)Widget to apply the styles to.
style (string)Style to apply to the widget, usually a space delimited list of styles.