Class Style
Defines a style used for painting and layout
Inheritance
System.Object
Style
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Azos.WinForms.dll
[TypeConverter(typeof(ExpandableObjectConverter))]
public class Style
Constructors
Creates a style in a context of control and parent. If an attribute is not defined in this instance it is tried to be fetched from parent.
If parent is not available then control context is used if it is not null for some properties like Font and BGColor. Both context and parent may be null
Declaration
public Style(Control contextCtl, Style parent)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Control |
contextCtl |
|
Style |
parent |
|
Properties
Declaration
[Browsable(false)]
public Brush BackBrush { get; }
Property Value
Type |
Description |
System.Drawing.Brush |
|
Defines background color. Call corresponding Clear method to delete attribute in this instance
Declaration
public Color BGColor { get; set; }
Property Value
Type |
Description |
System.Drawing.Color |
|
Defines second background color used by gradients. Call corresponding Clear method to delete attribute in this instance
Declaration
public Color BGColor2 { get; set; }
Property Value
Type |
Description |
System.Drawing.Color |
|
Defines background hatch color. Call corresponding Clear method to delete attribute in this instance
Declaration
public Color BGHatchColor { get; set; }
Property Value
Type |
Description |
System.Drawing.Color |
|
Defines background hatch style. Call corresponding Clear method to delete attribute in this instance
Declaration
public HatchStyle BGHatchStyle { get; set; }
Property Value
Type |
Description |
System.Drawing.Drawing2D.HatchStyle |
|
Defines background kind. Call corresponding Clear method to delete attribute in this instance
Declaration
public BGKind BGKind { get; set; }
Property Value
Defines bottom border style. Call corresponding Clear method to delete attribute in this instance
Declaration
public LineStyle BorderBottom { get; set; }
Property Value
Defines left border style. Call corresponding Clear method to delete attribute in this instance
Declaration
public LineStyle BorderLeft { get; set; }
Property Value
Defines right border style. Call corresponding Clear method to delete attribute in this instance
Declaration
public LineStyle BorderRight { get; set; }
Property Value
Defines top border style. Call corresponding Clear method to delete attribute in this instance
Declaration
public LineStyle BorderTop { get; set; }
Property Value
ControlContext
Returns a context/control that this style is in. May be null
Declaration
[Browsable(false)]
public Control ControlContext { get; }
Property Value
Type |
Description |
System.Windows.Forms.Control |
|
Defines font information. Null is never returned but may be set so it resets attribute in this instance
Declaration
public Font Font { get; set; }
Property Value
Type |
Description |
System.Drawing.Font |
|
Declaration
[Browsable(false)]
public Brush ForeBrush { get; }
Property Value
Type |
Description |
System.Drawing.Brush |
|
Defines foreground color. Call corresponding Clear method to delete attribute in this instance
Declaration
public Color ForeColor { get; set; }
Property Value
Type |
Description |
System.Drawing.Color |
|
Declaration
[Browsable(false)]
public Pen ForePen { get; }
Property Value
Type |
Description |
System.Drawing.Pen |
|
Defines text horizontal alignment. Call corresponding Clear method to delete attribute in this instance
Declaration
public HAlignment HAlignment { get; set; }
Property Value
Defines padding - an extra space inside of container. Call corresponding Clear method to delete attribute in this instance
Declaration
public Padding Padding { get; set; }
Property Value
Type |
Description |
System.Windows.Forms.Padding |
|
Returns parent style definition or null
Declaration
[Browsable(false)]
public Style Parent { get; }
Property Value
Methods
Copies attributes from another style
Declaration
public void Assign(Style from)
Parameters
Type |
Name |
Description |
Style |
from |
|
Declaration
public void ClearBGColor()
Declaration
public void ClearBGColor2()
Declaration
public void ClearBGHatchColor()
Declaration
public void ClearBGHatchStyle()
Declaration
public void ClearBGKind()
Declaration
public void ClearBorderBottom()
Declaration
public void ClearBorderLeft()
Declaration
public void ClearBorderRight()
Declaration
public void ClearBorderTop()
Declaration
public void ClearForeColor()
Declaration
public void ClearHAlignment()
Declaration
public void ClearPadding()
Extension Methods