/// <summary> /// Create Items for Menu ScrollContainer /// <summary> private void CreateMenu() { View menuContainer = _menuContainer.Container; menuContainer.Position = new Position(150, 0.0f, 0.0f); for (int i = 0; i < Constants.MenuItemsCount; i++) { ImageView menuItem = new ImageView(_imagePath + "/menu/" + i % 5 + ".png"); menuItem.Name = ("menu-item-" + _menuContainer.ItemCount); _menuContainer.Add(menuItem); } }
/// <summary> /// Perform Show animation on ScrollContainer (used only for Poster Container) /// </summary> /// <param name="scrollContainer">scrollContainer</param> private void Show(ScrollContainer scrollContainer) { scrollContainer.Add(scrollContainer.Container); _hideScrollContainer = null; // This animation will move Poster scrollContainer // from bottom to top and make it non-transparent. _showAnimation = new Animation(350); _showAnimation.AnimateTo(scrollContainer.Container, "ColorAlpha", 1.0f); scrollContainer.Container.PositionY = scrollContainer.Container.Position.Y + 200.0f; float targetPositionY = scrollContainer.Container.Position.Y - 200.0f; _showAnimation.AnimateTo(scrollContainer.Container, "PositionY", targetPositionY, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine)); _showAnimation.Play(); }