Spread Windows Forms 7.0 Product Documentation
IsEmpty Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetStyleModel Interface : IsEmpty Method


Glossary Item Box

Determines whether any styles are set in the model.

Syntax

Visual Basic (Declaration) 
Function IsEmpty() As Boolean
Visual Basic (Usage)Copy Code
Dim instance As ISheetStyleModel
Dim value As Boolean
 
value = instance.IsEmpty()
C# 
bool IsEmpty()

Return Value

Boolean: true if the model contains no style settings; false otherwise

Example

This example returns whether any styles are set for the model.
C#Copy Code
FarPoint.Win.Spread.Model.ISheetStyleModel ssm;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
FarPoint.Win.Spread.StyleInfo si;
bool b;
ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
ns.BackColor = Color.Yellow;
fpSpread1.NamedStyles.Add(ns);
ssm.SetDirectInfo(0, 0, ns);
b = ssm.IsEmpty();
label1.Text = "Is the model empty of styles =  " + b.ToString();
Visual BasicCopy Code
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim si As FarPoint.Win.Spread.StyleInfo
Dim b As Boolean
ssm = FpSpread1.ActiveSheet.Models.Style
ns.BackColor = Color.Yellow
FpSpread1.NamedStyles.Add(ns)
ssm.SetDirectInfo(0, 0, ns)
b = ssm.IsEmpty()
Label1.Text = "Is the model empty of styles =  " & b.ToString()

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.