This project is read-only.

FlipTransition does not work for stackpanel

Nov 15, 2010 at 6:09 AM

Dear All,

This is very urgent for me to solve this. Currently I am working on an project which has an requirement like If you click on button the usercontrol which is added in stackpanel should flip not whole grid. This is the following code where I am getting error Object reference no set to instance of object.

 void FlipWindowEffect()
        {
            FlipTransition transition = Resources["FlipTransition"] as FlipTransition;
            transition.Rotation = Direction.LeftToRight;
            TransitionPresenter TransitionContainer = new TransitionPresenter();
           
            TransitionContainer.Transition = transition;
            StackPanel sp = grdMain.Children[5] as StackPanel; // I am getting this stackpanel
           
            TransitionContainer.ApplyTransition(sp, sp);
        }

 I have tried

TransitionContainer.ApplyTransition(sp.Name, sp.Name);

 

but no effect.

 

please suggest me It is very urgent