Open.Core.Lists.ListTreePanel.SlideOff C# (CSharp) Method

SlideOff() public method

public SlideOff ( HorizontalEdge direction, System.Action onComplete ) : void
direction HorizontalEdge
onComplete System.Action
return void
        public void SlideOff(HorizontalEdge direction, Action onComplete)
        {
            // Ensure the panel is on stage.
            CenterStage();

            // Configure the animation.
            Dictionary properties = new Dictionary();
            properties[Css.Left] = direction == HorizontalEdge.Left ? 0 - Width : Width;

            // Perform animation.
            Container.Animate(
                        properties,
                        parentList.Slide.ToMsecs(), 
                        parentList.Slide.Easing, 
                        delegate
                            {
                                // On complete.
                                Hide();
                                Helper.Invoke(onComplete);
                            });
        }