/// <summary>
        /// Set the specified style.
        /// </summary>
        /// <returns><c>true</c>, if style was set for children gameobjects, <c>false</c> otherwise.</returns>
        /// <param name="style">Style data.</param>
        public bool SetStyle(Style style)
        {
            if (DefaultItem.Text != null)
            {
                style.ScrollBlock.Text.ApplyTo(DefaultItem.Text.GameObject);

                if (isInited)
                {
                    ComponentsPool.ForEachAll(x => style.ScrollBlock.Text.ApplyTo(x.Text.GameObject));
                }
            }

            return(true);
        }
        /// <summary>
        /// Process RectTransform resize.
        /// </summary>
        protected void Resize()
        {
            var max = CalculateMax();

            if (max == ComponentsPool.Count)
            {
                return;
            }

            ComponentsPool.Require(max);

            var median = ComponentsMedian;

            for (int i = 0; i < ComponentsPool.Count; i++)
            {
                ComponentsPool[i].Index = i - median;
                ComponentsPool[i].Owner = this;
                ComponentsPool[i].transform.SetAsLastSibling();
            }

            UpdateView();
        }
 /// <summary>
 /// Update view.
 /// </summary>
 public void UpdateView()
 {
     Init();
     ComponentsPool.ForEach(SetComponentText);
 }