ArcObjects Library Reference (Controls)  

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,
  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

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