ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / PlugIn Class / DisabledTooltip Property
Example

In This Topic
    DisabledTooltip Property (PlugIn)
    In This Topic
    Gets or sets the supplementary text that appears with the Tooltip only when the command is disabled.
    Syntax
    public string DisabledTooltip {get; set;}
    Public Property DisabledTooltip As String
    Remarks

    This property will by default return the disabledText text entered in its DAML declaration. Use this property if you need to change the heading at run-time.

    Example
    customize the disabedText property of a button or tool
    //Set the tool's loadOnClick attribute to "false" in the config.daml. 
    //This will allow the tool to be created when Pro launches, so that the disabledText property can display customized text at startup.
    //Remove the "condition" attribute from the tool. Use the OnUpdate method(below) to set the enable\disable state of the tool.
    //Add the OnUpdate method to the tool.
    //Note: since OnUpdate is called very frequently, you should avoid lengthy operations in this method 
    //as this would reduce the responsiveness of the application user interface.
    internal class SnippetButton : ArcGIS.Desktop.Framework.Contracts.Button
    {
      protected override void OnUpdate()
      {
        bool enableSate = true; //TODO: Code your enabled state  
        bool criteria = true;  //TODO: Evaluate criteria for disabledText  
    
        if (enableSate)
        {
          this.Enabled = true;  //tool is enabled  
        }
        else
        {
          this.Enabled = false;  //tool is disabled  
                                 //customize your disabledText here  
          if (criteria)
            this.DisabledTooltip = "Missing criteria 1";
        }
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also