Пример #1
0
        protected override void CalculateItemsSize()
        {
            StartPositions.Clear();

            if (Canvas.Children.Count == 0)
            {
                _ActiveListHeight = 0;
                _ActiveListWidth  = 0;
                return;
            }

            StartPositions.Add(0);

            UIElementBase element = Canvas.Children[0];
            int           max     = element.Bottom;

            for (int i = 1; i < Canvas.Children.Count; i++)
            {
                element = Canvas.Children[i];
                max     = Math.Max(max, element.Bottom);
            }

            int v = max + BottomPadding;

            StartPositions.Add(v);

            _ActiveListHeight = v;
        }
Пример #2
0
 public void AddElement(UIElementBase element)
 {
     m_UIElements.Add(String.IsNullOrEmpty(element.Name) ? "Element" + m_UIElements.Count : element.Name, element);
 }