Skip to content

ProGuide Checkboxes

UmaHarano edited this page May 6, 2024 · 20 revisions
Language:      C#
Subject:       Framework
Contributor:   ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization:  Esri, http://www.esri.com
Date:          04/04/2024
ArcGIS Pro:    3.3
Visual Studio: 2022

Check box controls allow you to add a check box on the ribbon. They are declared in DAML using the checkBox element within the controls container.

A check box is declared using the id, caption, className, and tooltip attributes.

The check box is referenced on a group using the checkBox element with the refID attribute.

<groups>
   <group id="MyGroup" caption="Group 1">
      <checkBox refID="MyCustomCheckBox" size="small" />       
   </group>
</groups>

<controls>    
   <checkBox id="MyCustomCheckBox" caption="My Checkbox" className="MyCheckBox" >
      <tooltip heading="click me"></tooltip>
   </checkBox>    
</controls> 

The className attribute references the check box implementation. This is a class that inherits from the ArcGIS.Desktop.Framework.Contracts.CheckBox base class. Override the virtual method OnClick to perform whatever custom behavior is desired.

Use the IsChecked runtime property to set the checked state. Toggle the IsChecked property between true and false for the normal dual-state check box or between true, false, and null for a tri-state check box.

internal class MyCheckBox : ArcGIS.Desktop.Framework.Contracts.CheckBox
{
   public MyCheckBox()
   {
      IsChecked = true;
   }

   protected override void OnClick()
   {
      // TODO - add specific customization here as necessary
   }
}

Developing with ArcGIS Pro

    Migration


Framework

    Add-ins

    Configurations

    Customization

    Styling


Arcade


Content


CoreHost


DataReviewer


Editing


Geodatabase

    3D Analyst Data

    Plugin Datasources

    Topology

    Object Model Diagram


Geometry

    Relational Operations


Geoprocessing


Knowledge Graph


Layouts

    Reports


Map Authoring

    3D Analyst

    CIM

    Graphics

    Scene

    Stream

    Voxel


Map Exploration

    Map Tools


Networks

    Network Diagrams


Parcel Fabric


Raster


Sharing


Tasks


Workflow Manager Classic


Workflow Manager


Reference

Clone this wiki locally