public void InitializeItem(VisualElement element, object flags)
        {
            Animations flags1 = (Animations)flags;

            CarouselParameterPath.SetElementBounds((RadElement)element, (Point)((Point3D)this.InitialPathPoint), Animations.Location);
            CarouselParameterPath.SetElementOpacity((RadElement)element, 0.0, flags1);
            CarouselParameterPath.SetElementScale((RadElement)element, this.ElementScale((Point3D)this.InitialPathPoint, 0.5), flags1);
            this.SetElementZIndex((RadElement)element, (Point3D)this.InitialPathPoint, flags1);
        }
        private void ApplyValueOut(
            RadElement element,
            double value,
            Animations flags,
            Size controlSize)
        {
            float   num = 1f - (float)(value * 0.5);
            Point3D pos = this.ConvertPointIfRelative((Point3D)this.FinalPathPoint, controlSize);

            CarouselParameterPath.SetElementScale(element, this.ElementScale(pos, (double)num), flags);
            CarouselParameterPath.SetElementBounds(element, (Point)pos, flags);
            CarouselParameterPath.SetElementOpacity(element, 1.0 - value, flags);
            this.SetElementZIndex(element, pos, flags);
        }
        private void ApplyValuePath(
            VisualElement element,
            Point3D newPoint,
            Animations flags,
            Size controlSize)
        {
            if (newPoint == null)
            {
                return;
            }
            newPoint = this.ConvertPointIfRelative(newPoint, controlSize);
            CarouselParameterPath.SetElementBounds((RadElement)element, (Point)newPoint, flags);
            double num = 1.0;
            CarouselContentItem carouselContentItem = (CarouselContentItem)element;

            switch (carouselContentItem.Owner.ItemsContainer.OpacityChangeCondition)
            {
            case OpacityChangeConditions.None:
                num = 1.0;
                break;

            case OpacityChangeConditions.SelectedIndex:
                num = 1.0 - Math.Abs((double)(carouselContentItem.Owner.ItemsContainer.Items.IndexOf((RadItem)carouselContentItem.HostedItem) - carouselContentItem.Owner.SelectedIndex) / (double)carouselContentItem.Owner.ItemsContainer.VisibleItemCount);
                break;

            case OpacityChangeConditions.ZIndex:
                if (((Point3D)this.FinalPathPoint).Z != 0.0)
                {
                    num = 1.0 - newPoint.Z / ((Point3D)this.FinalPathPoint).Z;
                    break;
                }
                break;
            }
            if (num < carouselContentItem.Owner.ItemsContainer.MinFadeOpacity)
            {
                num = carouselContentItem.Owner.ItemsContainer.MinFadeOpacity;
            }
            else if (num > 1.0)
            {
                num = 1.0;
            }
            CarouselParameterPath.SetElementOpacity((RadElement)element, num, flags);
            CarouselParameterPath.SetElementScale((RadElement)element, this.ElementScale(newPoint, 1.0), flags);
            this.SetElementZIndex((RadElement)element, newPoint, flags);
        }