Spread Silverlight Documentation
NamedStyles Property (GcSpreadSheet)
Example 


Gets or sets a collection of GrapeCity.Windows.SpreadSheet.Data.StyleInfo objects for this sheet.
Syntax
'Declaration
 
<System.ComponentModel.BrowsableAttribute(False)>
<System.ComponentModel.DefaultValueAttribute()>
Public Property NamedStyles As StyleInfoCollection
'Usage
 
Dim instance As GcSpreadSheet
Dim value As StyleInfoCollection
 
instance.NamedStyles = value
 
value = instance.NamedStyles
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DefaultValue()]
public StyleInfoCollection NamedStyles {get; set;}

Property Value

The collection of GrapeCity.Windows.SpreadSheet.Data.StyleInfo objects for this sheet.
Example
This example uses the NamedStyles property.
gcSpreadSheet1.NamedStyles.Add(new GrapeCity.Windows.SpreadSheet.Data.StyleInfo() { Background = new SolidColorBrush(Colors.Red), Name = "aaa", VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Center} );
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "aaa";
GcSpreadSheet1.NamedStyles.Add(New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() With {.Background = New SolidColorBrush(Colors.Red), .Name = "aaa", .VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Center})
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "aaa"
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.