Show / Hide Table of Contents

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()
Namespace: NFX.WinForms.Controls
Assembly: NFX.WinForms.dll
Syntax
[TypeConverter(typeof (ExpandableObjectConverter))]
public class Style

Constructors

Style(Control, Style)

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

BackBrush

Declaration
[Browsable(false)]
public Brush BackBrush { get; }
Property Value
Type Description
System.Drawing.Brush

BGColor

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

BGColor2

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

BGHatchColor

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

BGHatchStyle

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

BGKind

Defines background kind. Call corresponding Clear method to delete attribute in this instance

Declaration
public BGKind BGKind { get; set; }
Property Value
Type Description
BGKind

BorderBottom

Defines bottom border style. Call corresponding Clear method to delete attribute in this instance

Declaration
public LineStyle BorderBottom { get; set; }
Property Value
Type Description
LineStyle

BorderLeft

Defines left border style. Call corresponding Clear method to delete attribute in this instance

Declaration
public LineStyle BorderLeft { get; set; }
Property Value
Type Description
LineStyle

BorderRight

Defines right border style. Call corresponding Clear method to delete attribute in this instance

Declaration
public LineStyle BorderRight { get; set; }
Property Value
Type Description
LineStyle

BorderTop

Defines top border style. Call corresponding Clear method to delete attribute in this instance

Declaration
public LineStyle BorderTop { get; set; }
Property Value
Type Description
LineStyle

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

Font

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

ForeBrush

Declaration
[Browsable(false)]
public Brush ForeBrush { get; }
Property Value
Type Description
System.Drawing.Brush

ForeColor

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

ForePen

Declaration
[Browsable(false)]
public Pen ForePen { get; }
Property Value
Type Description
System.Drawing.Pen

HAlignment

Defines text horizontal alignment. Call corresponding Clear method to delete attribute in this instance

Declaration
public HAlignment HAlignment { get; set; }
Property Value
Type Description
HAlignment

Padding

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

Parent

Returns parent style definition or null

Declaration
[Browsable(false)]
public Style Parent { get; }
Property Value
Type Description
Style

Methods

Assign(Style)

Copies attributes from another style

Declaration
public void Assign(Style from)
Parameters
Type Name Description
Style from

ClearBGColor()

Declaration
public void ClearBGColor()

ClearBGColor2()

Declaration
public void ClearBGColor2()

ClearBGHatchColor()

Declaration
public void ClearBGHatchColor()

ClearBGHatchStyle()

Declaration
public void ClearBGHatchStyle()

ClearBGKind()

Declaration
public void ClearBGKind()

ClearBorderBottom()

Declaration
public void ClearBorderBottom()

ClearBorderLeft()

Declaration
public void ClearBorderLeft()

ClearBorderRight()

Declaration
public void ClearBorderRight()

ClearBorderTop()

Declaration
public void ClearBorderTop()

ClearForeColor()

Declaration
public void ClearForeColor()

ClearHAlignment()

Declaration
public void ClearHAlignment()

ClearPadding()

Declaration
public void ClearPadding()

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX