Check / Uncheck a ToggleButton From a StoryBoard in WPF?

You can use an ObjectAnimationUsingKeyFrames like so.

Up vote 1 down vote favorite share g+ share fb share tw.

I have an animation that expand / collapse some StackPanels, in the window there are some ToggleButtons that must be unchecked when the StackPanel is collapsed. I have the animation like this: This hides the StackPanel, but I need to uncheck the ToggleButton from other events. Is it possible to uncheck the ToggleButton From this StoryBoard?

An if so, do I need to verify if it's already checked / unchecked? C# wpf xaml storyboard togglebutton link|improve this question edited Aug 24 '11 at 17:53Dave Clemmer1,77331030 asked Oct 23 '09 at 17:06Luis62.

You can use an ObjectAnimationUsingKeyFrames like so: You should not need to check if it's already checked since setting it to false when it's already false should have no side effects.

When the ToggleButton is Unchecked it doesn't do anything, and when is checked throws an error "Can not animate property 'IsChecked' on 'System.Windows.Controls.Primitives. ToggleButton' with 'System.Windows.Media.Animation. ObjectAnimationUsingKeyFrames'" Am I doing something wrong?

– Luis Oct 23 '09 at 18:20.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions