I have a plugin that streams imagery and basmaps from proprietary apis. This has Login/Logout functionality. Logout should reset everything to the state before login (i.e. checkboxes should be unchecked and combo box value set back to default value). In this addin I have a split button on the ribbon with a custom control for the dropdown. This custom control has 4 checkboxes. I need to uncheck any checked boxes at logout. I am having difficulty achieving this. How do I access the checkboxes on a custom control from another form.
I have set up public and private bools in the custom control View Model as shown below.
private bool _isSelectedPremium;
public bool IsSelectedPremium
{
get { return _isSelectedPremium; }
set
{
_isSelectedPremium = value;
NotifyPropertyChanged("IsSelectedPremium");
}
}
The public bool is bound to the check box in the xaml:
<CheckBox Name="PremiumChkBx" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,10,0" IsChecked="{Binding IsSelectedPremium}"/>
I am able to do the business logic I need when checked on or off.
But I cannot get the checkboxes to reset (uncheck if checked) at logout. The Logout is a button click event handled in another form.
Any help is appreciated, thanks.