Application Conditions


PurposeThis sample demonstrates how conditions can be used to change when a Button is enabled or disabled in the Ribbon. This sample provides a series of buttons, each one with a different condition.

How to use

See Using the samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open a map containing various MapItems - Folders, Views, Links, FeatureLayers and so on.
  2. Select the Add-Ins tab in the Ribbon.
  3. Select different items in the Contents window or by clicking in the map view. Watch how the different Buttons are enabled or disabled depending on what type of item is selected. Try selecting multiple items.


  4. Conditions buttons enabled and disabled in Ribbon


Download the files for all languages
Buttons.cs Provides a series of Buttons which are enabled dependent upon different conditions.
Addins.xml Defines the conditions for each of the Button classes.
Download the C# files
Buttons.vb Provides a series of Buttons which are enabled dependent upon different conditions.
Addins.xml Defines the conditions for each of the Button classes.
Download the VB.NET files

See Also:

ArcGIS Explorer application conditions




Additional Requirements
  • A map containing various MapItems - Folders, Views, Links, FeatureLayers and so on.