private void FillLayerComboBox()
{
ComboBoxLayerSelector layerNameCombo = ComboBoxLayerSelector.GetLayerNameComboBox();
if (layerNameCombo == null)
return;
layerNameCombo.ClearAll();
IRasterLayer rasterLayer;
// Loop through the layers in the map and add the layer's name to the combo box.
for (int i = 0; i < m_map.LayerCount; i++)
{
if (m_map.get_Layer(i) is IRasterLayer)
{
rasterLayer = m_map.get_Layer(i) as IRasterLayer;
if (rasterLayer == null)
break;
layerNameCombo.AddItem(rasterLayer.Name, rasterLayer);
}
}
}