This question is locked. New answers and comments are not allowed.
Hi, I got problem with binding IsChecked property to my bool property in ViewModel, it looks like changes in viewModel are not propagated to ToggleSwitch, or am I missing something?
in MainPage.xaml
<ToggleSwitch:ToggleSwitchButton IsChecked="{Binding Toggle, Mode=TwoWay}"/> <Button Content="Button" Click="Button_Click"/> <TextBlock TextWrapping="Wrap" Text="{Binding Toggle}"/>private void Button_Click(object sender, System.Windows.RoutedEventArgs e) { MainViewModel model = ServiceLocator.Current.GetInstance<MainViewModel>(); model.Toggle = !model.Toggle; }public bool Toggle { get { return toggle; } set { if (toggle == value) return; toggle = value; RaisePropertyChanged(() => Toggle); } } private bool toggle;the text in textbox is updating, but Toggle is still Off - any hint?
Note: we use currently intermediate build 2012.2.518.2040