This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > ITOCBuddy2 Interface > ITOCBuddy2.IsLayerValid Method (ArcObjects .NET 10.4 SDK) |
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,
VARIANT_BOOL* IsValid
);
[C++]
Parameters pLayer [in]
pLayer is a parameter of type ILayer IsValid [out, retval] IsValid is a parameter of type VARIANT_BOOL
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.