Spread ASP.NET 6.0 Product Documentation
NamedStyles Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : NamedStyles Property


Glossary Item Box

Gets or sets a collection of styles.

Syntax

Visual Basic (Declaration) 
Public Property NamedStyles As NamedStyleCollection
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As NamedStyleCollection
 
instance.NamedStyles = value
 
value = instance.NamedStyles
C# 
public NamedStyleCollection NamedStyles {get; set;}

Property Value

NamedStyleCollection object containing collection of styles

Remarks

This property is available at run time only.

By default, the specified collection is shared between all style models in the sheet. When set, all style models that implement the INamedStyleSupport interface in the sheet are updated to reference the new collection.

Example

This example assigns a SheetView object to the active sheet and creates a new NamedStyle object. The BackColor and Border for the NamedStyle are defined, then its added to the NamedStyles collection for the SheetView.
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
Dimstyle1AsNewFarPoint.Web.Spread.NamedStyle()
style1.BackColor=Color.Yellow
style1.Border=NewFarPoint.Web.Spread.Border(BorderStyle.Dotted,Color.Red,3)
sv=FpSpread1.ActiveSheetView
sv.NamedStyles.Add(style1)
sv.DefaultStyle=style1
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.NamedStylestyle1=newFarPoint.Web.Spread.NamedStyle();
style1.BackColor=Color.Yellow;
style1.Border=newFarPoint.Web.Spread.Border(BorderStyle.Dotted,Color.Red,3);
sv.NamedStyles.Add(style1);
sv.DefaultStyle=style1;

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.