I feel completely dumb for not being able to figure this out, because I know I am missing something easy. Anyway, I have a settings form that opens when a user clicks the settings button on the Outlook ribbon I have created for my Outlook add-in. In the settings form is a checkbox, and when the user checks the box, I need to change the text of a label located back on the ribbon.
I am used to WPF, so normally what I would do in this situation is invoke a dispatcher since the form is on a different thread, but the whole dispatcher thing seems to go completely out the window with VSTO. What am I missing? Solutions for Windows Forms don't seem to work either.
Here is an example of what I am trying to do. This code would be in my settings form that pops up.
private void statusCheckBox_CheckedChange(object sender, eventargs e)
{
OutlookRibbon outlookRibbon = new outlookRibbon();
If(statusCheckBox.checked)
{
outlookRibbon.statusLabel.Label = "Checkbox Checked";
}
}
I know in the example I am creating a new instance of my ribbon, so that is why I am not seeing the label update, but I don't really know where to go from here. Any help is appreciated.