This document is archived and information here might be outdated.  Recommended version.


ITOCBuddy2.IsLayerValid Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > ITOCBuddy2 Interface > ITOCBuddy2.IsLayerValid Method
ArcGIS Developer Help

ITOCBuddy2.IsLayerValid Method

The TOCControl calls this method to ask the buddy if a layer is fully cached and valid if it cannot determine this on its own.

[Visual Basic .NET]
Public Function IsLayerValid ( _
    ByVal pLayer As ILayer _
) As Boolean
[C#]
public bool IsLayerValid (
    ILayer pLayer
);
[C++]
HRESULT IsLayerValid(
  ILayer* pLayer
);
[C++]
Parameters
pLayer [in]

pLayer is a parameter of type ILayer*

Product Availability

Available with ArcGIS Engine.

Description

The IsLayerValid method returns whether the specified layer is fullly cached and so valid, even if the connection to the layers data source is broken.

If a layer (typically a raster layer) within a GlobeControl is fully cached the original data source does not need to be present in order for the layer to display. To ensure that the TOCControl does not display this layer as broken (with a red exclamation symbol !), the IsLayerValid method additionally checks if layer is fully cached.

See Also

ITOCBuddy2 Interface