AnsweredAssumed Answered

How to obtain button id on click event?

Question asked by roman536 on Oct 4, 2018
Latest reply on Oct 4, 2018 by roman536

I would like to retrieve button id of Config.daml from c# OnClick event without fixed coding:

...

<controls>

   <button id="ButtonID_TS1" className="ModuleID_TestAddIn:OnCustomButtonClick_StateID_1"

...

internal static void OnCustomButtonClick_StateID_1()
{

string ButtonID = ?   // how to obtain button id? --> "ButtonID_TS1";

...

 

I am studying arcgis-pro-sdk/wiki/ProConcepts-Framework with arcgis-pro-sdk-community-samples but cannot find appropriate method.

Having ButtonID I am able to get another button parameters using ArcGIS.Desktop.Framework - FrameworkApplication.GetPlugInWrapper(ButtonID) or any custom parameters applying <categories> with <content> using Categories.GetComponentElements and component.ReadAttribute functions.

Outcomes