private void OnToggleVisibility(object sender, RoutedEventArgs e)
        {
            MSCRasterService activeRasterService = ArcGISRibbon.GetActiveRasterService();

            if (activeRasterService == null)
            {
                return;
            }
            activeRasterService.ToggleVisiblity();
        }
Exemple #2
0
            public void Execute(object param)
            {
                if (Application.DocumentManager.MdiActiveDocument == null)
                {
                    return;
                }
                RibbonButton ribbonButton = param as RibbonButton;

                if (ribbonButton != null)
                {
                    MSCRasterService activeRasterService = ArcGISRibbon.GetActiveRasterService();
                    if (activeRasterService == null)
                    {
                        Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(AfaStrings.NoCurrentMapServiceFound);
                        return;
                    }
                    activeRasterService.ToggleVisiblity();
                }
            }