This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IC > IConnectedCells Interface > IConnectedCells.IsForeground Property (ArcObjects .NET 10.5 SDK) |
Indicates if the position is foreground or background.
[Visual Basic .NET] Public Function get_IsForeground ( _ ByVal position As IPoint _ ) As Boolean
[C#] public bool get_IsForeground ( IPoint position );
The following code shows an example of this method in C#.
//You can get app from ICommand :: OnCreate() hook parameter
IConnectedCells connectedCells=app.FindExtensionByName("ESRI ArcScan Tools") as IConnectedCells;
ESRI.ArcGIS.Geometry.IPoint currentPoint=new ESRI.ArcGIS.Geometry.Point();
currentPoint.PutCoords(39.4, 37.2);
System.Diagnostics.Debug.Print(connectedCells.get_IsForeground(currentPoint).ToString());
The following code shows an example of this method in VBNet.
Public Sub IsForeground()
'You can get app from ICommand :: OnCreate() hook parameter
Dim connectedCells As IConnectedCells=TryCast(app.FindExtensionByName("ESRI ArcScan Tools"), IConnectedCells)
Dim currentPoint As ESRI.ArcGIS.Geometry.IPoint=New ESRI.ArcGIS.Geometry.Point()
currentPoint.PutCoords(39.4, 37.2)
System.Diagnostics.Debug.Print(connectedCells.IsForeground(currentPoint).ToString())
End Sub