Пример #1
0
        private void CollapseSetting_AnimationFinished(object sender, AnimationStatusEventArgs e)
        {
            this.OnUpdateViewNeeded(EventArgs.Empty);
            IList <GridRowElement> visualRows = this.TableElement.VisualRows;

            GridExpandAnimationFade.FadeAnimatedPropertySetting animatedPropertySetting1 = sender as GridExpandAnimationFade.FadeAnimatedPropertySetting;
            int rowIndex = animatedPropertySetting1.RowIndex;

            animatedPropertySetting1.AnimationFinished -= new AnimationFinishedEventHandler(this.CollapseSetting_AnimationFinished);
            for (int index = rowIndex; index < visualRows.Count; ++index)
            {
                GridRowElement gridRowElement = visualRows[index];
                if (gridRowElement.Visibility != ElementVisibility.Hidden)
                {
                    GridExpandAnimationFade.FadeAnimatedPropertySetting animatedPropertySetting2 = new GridExpandAnimationFade.FadeAnimatedPropertySetting(VisualElement.OpacityProperty, (object)0.0, (object)1.0, 9, 30);
                    animatedPropertySetting2.RemoveAfterApply = true;
                    animatedPropertySetting2.ApplyValue((RadObject)gridRowElement);
                }
            }
        }
Пример #2
0
        public override void Collapse(GridViewRowInfo rowInfo, float maxOffset, int rowIndex)
        {
            IList <GridRowElement> visualRows = this.TableElement.VisualRows;

            for (int index = rowIndex; index < visualRows.Count; ++index)
            {
                GridRowElement gridRowElement = visualRows[index];
                if (gridRowElement.Visibility != ElementVisibility.Hidden)
                {
                    GridExpandAnimationFade.FadeAnimatedPropertySetting animatedPropertySetting = new GridExpandAnimationFade.FadeAnimatedPropertySetting(VisualElement.OpacityProperty, (object)1.0, (object)0.0, 9, 30);
                    animatedPropertySetting.RemoveAfterApply = true;
                    if (index == visualRows.Count - 1)
                    {
                        animatedPropertySetting.AnimationFinished += new AnimationFinishedEventHandler(this.CollapseSetting_AnimationFinished);
                        animatedPropertySetting.RowIndex           = rowIndex;
                    }
                    animatedPropertySetting.ApplyValue((RadObject)gridRowElement);
                }
            }
        }