jeudi 16 juillet 2015

Mutually exclusive Checboxes - C#, MVVM

I writing a program which will have to possibilities. Set Time&Date Manually or use Computer/System Time&Date.

So now I need to make two Checboxes which are Mutually Exclusive. When one will be chosen, another must be Unchecked. How to do it this in MVVM?

<CheckBox Name="UseSystemTime" Margin="7"  Content="Use System Time and Date settings (Time, Date, DST, Timezone)" IsChecked="{Binding UseSystemTime}"/>
<CheckBox Name="ManualTime" Margin="7"  Content="Set settings Manually" IsChecked="{Binding SetSettingsManually}"/>

If found something, but is not any easier solution already implemented in XAML it self?

WPF coding mutually exclusive Check Boxes with Data Binding

Thanks!




Aucun commentaire:

Enregistrer un commentaire