WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridMarginsInfo - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridMarginsInfo

    Provides a StyleInfoSubObjectBase object for margins in a cell. Each margin side of the cell can be configured individually with a GridMargins value. Margin sides that have not been initialized will inherit default values from a base style.

    Inheritance
    System.Object
    ShouldSerializeBasedPersisterType
    StyleInfoBase
    StyleInfoSubObjectBase
    GridStyleInfoSubObject
    GridMarginsInfo
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Inherited Members
    GridStyleInfoSubObject.GetGridStyleInfo()
    GridStyleInfoSubObject.GetCellIdentity()
    GridStyleInfoSubObject.GetGridModel()
    GridStyleInfoSubObject.GetActiveGridView()
    GridStyleInfoSubObject.ToString()
    GridStyleInfoSubObject.Info
    StyleInfoSubObjectBase.Dispose(Boolean)
    StyleInfoSubObjectBase.OnStyleChanged(StyleInfoProperty)
    StyleInfoSubObjectBase.IntGetDefaultStyleInfo(StyleInfoProperty)
    StyleInfoSubObjectBase.SubObjectIdentity
    StyleInfoSubObjectBase.Sip
    StyleInfoSubObjectBase.Data
    StyleInfoSubObjectBase.Owner
    StyleInfoBase.WriteXml(XmlWriter)
    StyleInfoBase.ReadXml(XmlReader)
    StyleInfoBase.SetStore(StyleInfoStore)
    StyleInfoBase.ClearCache()
    StyleInfoBase.Dispose()
    StyleInfoBase.Equals(Object)
    StyleInfoBase.EqualsObject(Object, Object)
    StyleInfoBase.GetHashCode()
    StyleInfoBase.ToString(String)
    StyleInfoBase.ToString(String, IFormatProvider)
    StyleInfoBase.ParseString(String)
    StyleInfoBase.BeginInit()
    StyleInfoBase.EndInit()
    StyleInfoBase.BeginUpdate()
    StyleInfoBase.EndUpdate()
    StyleInfoBase.CreateSubObjectIdentity(StyleInfoProperty)
    StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty)
    StyleInfoBase.OnStyleChanging(StyleInfoProperty)
    StyleInfoBase.IsSubset(IStyleInfo)
    StyleInfoBase.CopyFrom(IStyleInfo)
    StyleInfoBase.ModifyStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.InheritStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.MergeStyle(IStyleInfo)
    StyleInfoBase.HasValue(StyleInfoProperty)
    StyleInfoBase.IsValueModified(StyleInfoProperty)
    StyleInfoBase.ResetValue(StyleInfoProperty)
    StyleInfoBase.GetValue(StyleInfoProperty)
    StyleInfoBase.GetDefaultValue(StyleInfoProperty)
    StyleInfoBase.GetShortValue(StyleInfoProperty)
    StyleInfoBase.SetValue(StyleInfoProperty, Object)
    StyleInfoBase.SetValue(StyleInfoProperty, Int16)
    StyleInfoBase.IConvertible.ToUInt64(IFormatProvider)
    StyleInfoBase.IConvertible.ToSByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToDouble(IFormatProvider)
    StyleInfoBase.IConvertible.ToDateTime(IFormatProvider)
    StyleInfoBase.IConvertible.ToSingle(IFormatProvider)
    StyleInfoBase.IConvertible.ToBoolean(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt32(IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToString(IFormatProvider)
    StyleInfoBase.IConvertible.ToByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToChar(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt64(IFormatProvider)
    StyleInfoBase.IConvertible.GetTypeCode()
    StyleInfoBase.IConvertible.ToDecimal(IFormatProvider)
    StyleInfoBase.IConvertible.ToType(Type, IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt32(IFormatProvider)
    StyleInfoBase.Identity
    StyleInfoBase.Store
    StyleInfoBase.CacheValues
    StyleInfoBase.WeakReferenceChangedListeners
    StyleInfoBase.Updating
    StyleInfoBase.IsEmpty
    StyleInfoBase.IsChanged
    StyleInfoBase.Changed
    StyleInfoBase.Changing
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridMarginsInfo : GridStyleInfoSubObject, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
    Examples

    The following code changes margin information for cells:

    GridMargins margins = new GridMargins(1, 1, 2, 2); model[rowIndex, colIndex].Margins = new GridMarginsInfo(margins); model[rowIndex, colIndex+1].Margins.Right = 2; model[rowIndex, colIndex+1].Margins.Left = 2;

    Constructors

    GridMarginsInfo()

    Initializes a new empty instance ofGridMarginsInfo class.

    Declaration
    public GridMarginsInfo()

    GridMarginsInfo(StyleInfoSubObjectIdentity)

    Initalizes a new GridMarginsInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.

    Declaration
    public GridMarginsInfo(StyleInfoSubObjectIdentity identity)
    Parameters
    Type Name Description
    StyleInfoSubObjectIdentity identity

    A GridStyleInfoSubObjectIdentity that holds the indentity for this GridMarginsInfo.

    GridMarginsInfo(StyleInfoSubObjectIdentity, GridMarginsInfoStore)

    Initalizes a new instance ofGridMarginsInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.

    Declaration
    public GridMarginsInfo(StyleInfoSubObjectIdentity identity, GridMarginsInfoStore store)
    Parameters
    Type Name Description
    StyleInfoSubObjectIdentity identity

    A GridStyleInfoSubObjectIdentity that holds the indentity for this GridMarginsInfo.

    GridMarginsInfoStore store

    A GridMarginsInfoStore that holds data for this GridMarginsInfo. All changes in this style object will saved in the GridMarginsInfoStore object.

    GridMarginsInfo(GridMargins)

    Initializes a new instances ofGridMarginsInfo and copies settings from a GridMargins object.

    Declaration
    public GridMarginsInfo(GridMargins margins)
    Parameters
    Type Name Description
    GridMargins margins

    A GridMargins object used to initialize the current object.

    GridMarginsInfo(Int32, Int32, Int32, Int32)

    Initializes a new instances ofGridMarginsInfo and saves left, top, right and bottom margins.

    Declaration
    public GridMarginsInfo(int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.Int32 left

    Left margin.

    System.Int32 top

    The top margin.

    System.Int32 right

    The right margin.

    System.Int32 bottom

    The bottom margin.

    Properties

    Bottom

    Gets or sets the bottom margin

    Declaration
    public int Bottom { get; set; }
    Property Value
    Type Description
    System.Int32

    Default

    Gets a default GridMarginsInfo to be used with a default style.

    Declaration
    public static GridMarginsInfo Default { get; }
    Property Value
    Type Description
    GridMarginsInfo
    Remarks

    The Default of the GridStyleInfo class will return the default margin info that this method generates through its overridden version of GetDefaultStyle().

    Empty

    Gets a empty GridMarginsInfo.

    Declaration
    public static GridMarginsInfo Empty { get; }
    Property Value
    Type Description
    GridMarginsInfo

    HasBottom

    Gets a value indicating whether the bottom margin has been initialized.

    Declaration
    public bool HasBottom { get; }
    Property Value
    Type Description
    System.Boolean

    HasLeft

    Gets a value indicating whether the left margin has been initialized.

    Declaration
    public bool HasLeft { get; }
    Property Value
    Type Description
    System.Boolean

    HasRight

    Gets a value indicating whether the right margin has been initialized.

    Declaration
    public bool HasRight { get; }
    Property Value
    Type Description
    System.Boolean

    HasTop

    Gets a value indicating whether the top margin has been initialized.

    Declaration
    public bool HasTop { get; }
    Property Value
    Type Description
    System.Boolean

    Left

    Gets or sets the left margin

    Declaration
    public int Left { get; set; }
    Property Value
    Type Description
    System.Int32

    Right

    Gets or sets the right margin

    Declaration
    public int Right { get; set; }
    Property Value
    Type Description
    System.Int32

    Top

    Gets or sets the top margin

    Declaration
    public int Top { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    GetDefaultStyle()

    Override this method to return a default style object for your derived class.

    Declaration
    protected override StyleInfoBase GetDefaultStyle()
    Returns
    Type Description
    StyleInfoBase

    A default style object.

    Overrides
    StyleInfoBase.GetDefaultStyle()

    MakeCopy(StyleInfoBase, StyleInfoProperty)

    Creates an exact copy of the current object.

    Declaration
    public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
    Parameters
    Type Name Description
    StyleInfoBase newOwner

    The new owner style object for the copied object.

    StyleInfoProperty sip

    An identifier for this object.

    Returns
    Type Description
    IStyleInfoSubObject

    A duplicate object.

    Overrides
    StyleInfoSubObjectBase.MakeCopy(StyleInfoBase, StyleInfoProperty)

    ResetBottom()

    Resets the bottom margin

    Declaration
    public void ResetBottom()

    ResetLeft()

    Resets the left margin

    Declaration
    public void ResetLeft()

    ResetRight()

    Resets the right margin

    Declaration
    public void ResetRight()

    ResetTop()

    Resets the top margin

    Declaration
    public void ResetTop()

    ToMargins()

    Converts this object to a GridMargins object.

    Declaration
    public GridMargins ToMargins()
    Returns
    Type Description
    GridMargins

    A GridMargins object filled with the current objects settings.

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved