Hi Daniel,
One common pattern is to use the Module1 class to hold your selected values and allow other controls to access the value through the Module1 class (which is a singleton). So in your example you need to add a public property, which I call 'MyComboboxValue', to the Module1 class in order to hold the combobox selection:
internal class Module1 : Module
{
private static Module1 _this = null;
public static Module1 Current
{
...
}
public string MyComboboxValue { get; set; }
...
}
Now you need to store the ComboBox selection by modifying the ComboBox1 class' OnSelectionChange method:
protected override void OnSelectionChange(ComboBoxItem item)
{
if (item == null) return;
Module1.Current.MyComboboxValue = item.Text;
}
Finally you can use the 'shared' property throughout your add-in by using the Modul1 class' Current member: Module1.Current.MyComboboxValue. For example:
MessageBox.Show($@"From Combo Box: {Module1.Current.MyComboboxValue}");
If you need to access any values from another add-in you can use a Pro FrameworkApplication function to get the Module1 instance like this:
((Module1)FrameworkApplication.FindModule("ProAppModule1_Module")).MyComboboxValue
Hope this helps