Class StyleInfoSubObjectBase
StyleInfoSubObjectBase is an abstract base class for classes to be used as subobjects in a StyleInfoBase.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.CellGrid.Styles
Assembly: Syncfusion.SfCellGrid.WPF.dll
Syntax
public abstract class StyleInfoSubObjectBase : StyleInfoBase, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject, IDisposable
Remarks
StyleInfoSubObjectBase is derived from 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 StyleInfoSubObjectBase supports this inheritance mechanism as a subobject from a StyleInfoBase. A subobject needs to have knowledge about its parent object and be able to walk the base styles from the parent object.
Examples for implementation of StyleInfoSubObjectBase are the font and border classes in Essential Grid.
Programmers can derive their own style classes from StyleInfoSubObjectBase 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 StyleInfoSubObjectBase, your new object will support property inheritance from base styles.
See the overview for StyleInfoBase for further discussion about style objects.
Constructors
StyleInfoSubObjectBase(StyleInfoStore)
Overloaded. Initializes a new StyleInfoSubObjectBase object and associates it with an existing StyleInfoStore.
Declaration
protected StyleInfoSubObjectBase(StyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoStore | store | A StyleInfoStore that holds data for this object. All changes in this style object will be saved in the StyleInfoStore object. |
StyleInfoSubObjectBase(StyleInfoSubObjectIdentity, StyleInfoStore)
Initializes a new StyleInfoSubObjectBase object and associates it with an existing StyleInfoStore.
Declaration
protected StyleInfoSubObjectBase(StyleInfoSubObjectIdentity identity, StyleInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A StyleInfoSubObjectIdentity that holds the identity for this StyleInfoBase. A StyleInfoStore that holds data for this object. All changes in this style object will be saved in the StyleInfoStore object. |
StyleInfoStore | store |
Properties
Data
Returns the data for this object. This is the StyleInfoStore from the constructor.
Declaration
public object Data { get; }
Property Value
Type |
---|
System.Object |
Owner
Returns a reference to the owner style object.
Declaration
public StyleInfoBase Owner { get; }
Property Value
Type |
---|
StyleInfoBase |
Sip
Returns a unique identifier for this subobject in the owner style object.
Declaration
public StyleInfoProperty Sip { get; }
Property Value
Type |
---|
StyleInfoProperty |
SubObjectIdentity
Returns the StyleInfoSubObjectIdentity with identity information about this object.
Declaration
public StyleInfoSubObjectIdentity SubObjectIdentity { get; }
Property Value
Type |
---|
StyleInfoSubObjectIdentity |
Methods
Dispose(Boolean)
Releases all the resources used by the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Dispose the instance, if it is True |
Overrides
IntGetDefaultStyleInfo(StyleInfoProperty)
Locates the base style that has the specified property and returns its instance.
Declaration
protected override StyleInfoBase IntGetDefaultStyleInfo(StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoProperty | sip | Identifies the property to look for. |
Returns
Type | Description |
---|---|
StyleInfoBase | The style object that has the specified property. |
Overrides
MakeCopy(StyleInfoBase, StyleInfoProperty)
Makes an exact copy of the current object.
Declaration
public virtual IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | The identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | A copy of the current object registered with the new owner style object. |
OnStyleChanged(StyleInfoProperty)
Declaration
protected override void OnStyleChanged(StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoProperty | sip |