Spread Silverlight Documentation
Parent Property (StyleInfo)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > StyleInfo Class : Parent Property
Gets or sets the name of the parent (StyleInfo object) of the style.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public Overridable Property Parent As System.String
'Usage
 
Dim instance As StyleInfo
Dim value As System.String
 
instance.Parent = value
 
value = instance.Parent
[System.ComponentModel.DefaultValue()]
public virtual System.string Parent {get; set;}

Property Value

The parent style name.
Example
This example sets the Parent property.
GrapeCity.Windows.SpreadSheet.Data.StyleInfo aaa = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
aaa.Background = New SolidColorBrush(Colors.Aquamarine);
aaa.Parent = "ParentStyle";
aaa.Name = "aaa";
GrapeCity.Windows.SpreadSheet.Data.StyleInfo ParentStyle = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
ParentStyle.Background = new SolidColorBrush(Colors.Aquamarine);
ParentStyle.HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right;
ParentStyle.Name = "ParentStyle";
gcSpreadSheet1.Sheets[0].NamedStyles.Add(aaa);
gcSpreadSheet1.Sheets[0].NamedStyles.Add(ParentStyle);
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "aaa";
GcSpreadSheet1.Invalidate();
Dim aaa As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
aaa.Background = New SolidColorBrush(Colors.Aquamarine)
aaa.Parent = "ParentStyle"
aaa.Name = "aaa"
Dim ParentStyle As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
ParentStyle.Background = New SolidColorBrush(Colors.Aquamarine)
ParentStyle.HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right
ParentStyle.Name = "ParentStyle"
GcSpreadSheet1.Sheets(0).NamedStyles.Add(aaa)
GcSpreadSheet1.Sheets(0).NamedStyles.Add(ParentStyle)
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "aaa"
GcSpreadSheet1.Invalidate()
See Also

Reference

StyleInfo Class
StyleInfo Members