Members  Example 

Syncfusion.Windows.Forms.Grid Namespace : GridStyleInfoSubObject Class

GridStyleInfoSubObject Class

GridStyleInfoSubObject is an abstract base class for classes to be used as sub-objects in a GridStyleInfo.
Object Model
GridStyleInfoSubObject ClassStyleInfoIdentityBase ClassStyleInfoBase ClassStyleInfoProperty ClassStyleInfoStore ClassStyleInfoSubObjectIdentity Class
Public MustInherit Class GridStyleInfoSubObject 
   Inherits Syncfusion.Styles.StyleInfoSubObjectBase
   Implements Syncfusion.Styles.IStyleInfo, Syncfusion.Styles.IStyleInfoSubObject 
Dim instance As GridStyleInfoSubObject
GridStyleInfoSubObject is derived from Syncfusion.Styles.StyleInfoBase and thus provides the same easy way to provide properties that can inherit values from base styles at run-time.

The difference is that GridStyleInfoSubObject supports this inheritance mechanism as a sub-object from a GridStyleInfo. A sub-object needs to have knowledge about its parent object and be able to walk the base styles from the parent object.

Examples for implementation of GridStyleInfoSubObject are the font and border classes in Essential Grid.

Programmers can derive their own style classes from GridStyleInfoSubObject and add type-safe (and intelli-sense) supported custom properties to the style class. If you write your own SpinButton class that needs individual properties, simply add a CellSpinButtonInfo class as subobject. If you derive CellSpinButtonInfo from GridStyleInfoSubObject, your new object will support property inheritance from base styles.

See the overview for Syncfusion.Styles.StyleInfoBase for further discussion about style objects.

The following example shows how you can use the GridFontInfo class in Essential Grid:
standard.Font.Facename = "Helvetica";
model[1, 3].Font.Bold = true;
string faceName = model[1, 3].Font.Facename; // any cell inherits standard style
Console.WriteLIne(faceName); // will output "Helvetica"
Console.WriteLIne(model[1, 3].Font.Bold); // will output "true"
Console.WriteLIne(model[1, 3].Font.HasFaceName); // will output "False"
Inheritance Hierarchy



Syncfusion.Grid.Windows: 17.1460.0.47

See Also