Hi,
I saw this example ProGuide Checkboxes for checkboxes in ArcGIS Pro addins.
I have created a checkbox class in Checkbox1.cs.
But how can I use the IsChecked.Value in Module1.cs? If the checkbox ischecked, a script should copy the project to another place after ProjectClosed state.
Thanks Karsten
Solved! Go to Solution.
Hi Karsten,
You could create a public static property in the module class and set that to the check box's IsChecked property.
class ProCheckbox : ArcGIS.Desktop.Framework.Contracts.CheckBox
{
public ProCheckbox()
{
IsChecked = true;
}
protected override void OnClick()
{
// TODO - add specific customization here as necessary
//Module1.CheckBoxIsChecked is a public static property in the module class file.
Module1.CheckBoxIsChecked = IsChecked.HasValue ? IsChecked.Value : false;
MessageBox.Show($"Checked: {Module1.CheckBoxIsChecked}");
}
}
Hi Karsten,
You could create a public static property in the module class and set that to the check box's IsChecked property.
class ProCheckbox : ArcGIS.Desktop.Framework.Contracts.CheckBox
{
public ProCheckbox()
{
IsChecked = true;
}
protected override void OnClick()
{
// TODO - add specific customization here as necessary
//Module1.CheckBoxIsChecked is a public static property in the module class file.
Module1.CheckBoxIsChecked = IsChecked.HasValue ? IsChecked.Value : false;
MessageBox.Show($"Checked: {Module1.CheckBoxIsChecked}");
}
}
Thank you Uma!
This was what I searched!