i have groupbox has initial opacity of 0 (zero) , i.e: hidden.
when button clicked, animation kicks off sets opacity 0 -> 100 through 1 keyframe on 2 seconds. of works.
the groupbox contains form, once submitted, want hide groupbox.
using code:
campaignname.text = ""; //works campaignfromemail.text = ""; //works templatescombo.itemssource = null; //works templatescombo.items.clear(); //works gbcreatecampaign.opacity = 0; // no effect gbcreatecampaign.visibility = visibility.hidden; //no effect
this in opinion should work. ok won't have fade out effect, point groupbox (gbcreatecampaign) still visible on screen full opacity after call.
any ideas?
an animation in wpf keeps on 'going' default. when try change property in code (or other way) overruled or negated animation.
you'll need either:
- set animation's fillbehavior property stop - stops setting property
to
value of animation after animation has completed.
or
- remove entire storyboard - note animations in storyboard removed
or
- remove animation individual property.