CheckBox
How to bind checkBox with two storyboards, so that when I click the checkbox start the second storyboard? first storyboard I have a car that runs on the road, while the second storyboard should do the same car that runs on a black surface, it should be going after the same street except that reduce the opacity to 0.
nedzada alesevicPosted Sep 5, 2010, 5:42 AM
public partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
// Insert code required on object creation below this point.
}
private void ckBox_Unchecked(object sender, System.Windows.RoutedEventArgs e)
{
Storyboard st = Resources["stplus"] as Storyboard;
st.Begin(this, true);
}
private void ckBox_Checked(object sender, System.Windows.RoutedEventArgs e)
{
Storyboard st = Resources["stminus"] as Storyboard;
st.Begin(this, true);
}
}
}
Vasanth RPosted Sep 5, 2010, 12:09 AM
Call this function in the check box checked changed event
------------------------------------
thanks
vr
Mark it as Answer if it helps