Spread ASP.NET 6.0 Product Documentation
IsDefined Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > Appearance Class : IsDefined Method


prop
AppearanceProperty object containing the appearance property

Glossary Item Box

Returns whether an appearance property has been set.

Syntax

Visual Basic (Declaration) 
Public Overridable Function IsDefined( _
   ByVal prop As AppearanceProperty _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Appearance
Dim prop As AppearanceProperty
Dim value As Boolean
 
value = instance.IsDefined(prop)
C# 
public virtual bool IsDefined( 
   AppearanceProperty prop
)

Parameters

prop
AppearanceProperty object containing the appearance property

Return Value

Boolean: true if property is set; false otherwise

Remarks

Use this method to check if one of the appearance properties has been set for the object. For a list of the properties, see the AppearanceProperty class list of members.

Example

This example creates two Appearance objects and a Cell object. Several properties are set for the first Appearance object, and they are subsequently copied to the second instance. The properties are then applied from the second Appearance object to the Cell objects corresponding properties. The BackColor property of the Appearance object is then queried to see if it has been defined, and the result is returned to a text box.
C#Copy Code
FarPoint.Web.Spread.Appearanceappr=NewFarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Appearanceappr1=NewFarPoint.Web.Spread.Appearance();
FarPoint.Web.Spread.Cellacell;
appr.BackColor=Color.Red;
appr.ForeColor=Color.White;
appr.Font.Bold=True;
appr.HorizontalAlign=HorizontalAlign.Right;
appr.VerticalAlign=VerticalAlign.Top;
appr1.Copy(appr);
acell=FpSpread1.Cells[0,0];
acell.BackColor=appr1.BackColor;
acell.ForeColor=appr1.ForeColor;
acell.Font.Bold=appr1.Font.Bold;
acell.HorizontalAlign=appr1.HorizontalAlign;
acell.VerticalAlign=appr1.VerticalAlign;
FpSpread1.ActiveSheetView.SetCellValue(0,0,"AppearanceTest");
FpSpread1.Columns[0].Width=150;
FpSpread1.Rows[0].Height=60;
boolbl;
bl=appr.IsDefined(FarPoint.Web.Spread.AppearanceProperty.BackColor);
TextBox1.Text=Convert.ToString(bl);
Visual BasicCopy Code
DimapprAsNewFarPoint.Web.Spread.Appearance()
Dimappr1AsNewFarPoint.Web.Spread.Appearance()
appr.BackColor=Color.Red
appr.ForeColor=Color.White
appr.Font.Bold=True
appr.HorizontalAlign=HorizontalAlign.Right
appr.VerticalAlign=VerticalAlign.Top
appr1.Copy(appr)
DimacellAsFarPoint.Web.Spread.Cell
acell=FpSpread1.Cells(0,0)
acell.BackColor=appr1.BackColor
acell.ForeColor=appr1.ForeColor
acell.Font.Bold=appr1.Font.Bold
acell.HorizontalAlign=appr1.HorizontalAlign
acell.VerticalAlign=appr1.VerticalAlign
FpSpread1.ActiveSheetView.SetCellValue(0,0,"AppearanceTest")
FpSpread1.Columns(0).Width=150
FpSpread1.Rows(0).Height=60
DimpropAsFarPoint.Web.Spread.AppearanceProperty
DimblAsBoolean
bl=appr.IsDefined(prop.BackColor)
TextBox1.Text=bl

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.