Having 4 Expander controls. When one expander is expanded how can I make all others collapse/close?
@wassim-azirar asked to the accepted answer:
How can I expand 'Expander 1' at the application Startup ?
I added in the ViewModel:
SelectedExpander = "1";
Because of the fact, that the "1" is not the same object as the "1" in XAML this will not work, so I changed decyclone's answer like this:
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (string)value == (string)parameter;
}
The answer of decyclone was very helpful for me - Thanks.
So I would like to share my experience if someone needs it.