/// <summary>
 /// Initializes a new instance of the <see cref="ItemsRepeater"/> class.
 /// </summary>
 public ItemsRepeater()
 {
     _viewManager     = new ViewManager(this);
     _viewportManager = new ViewportManager(this);
     KeyboardNavigation.SetTabNavigation(this, KeyboardNavigationMode.Once);
     OnLayoutChanged(null, Layout);
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemsRepeater"/> class.
        /// </summary>
        public ItemsRepeater()
        {
            _layoutWeakSubscriber = new TargetWeakEventSubscriber <ItemsRepeater, EventArgs>(
                this, static (target, _, ev, _) =>
            {
                if (ev == AttachedLayout.ArrangeInvalidatedWeakEvent)
                {
                    target.InvalidateArrange();
                }
                else if (ev == AttachedLayout.MeasureInvalidatedWeakEvent)
                {
                    target.InvalidateMeasure();
                }
            });

            _viewManager     = new ViewManager(this);
            _viewportManager = new ViewportManager(this);
            KeyboardNavigation.SetTabNavigation(this, KeyboardNavigationMode.Once);
            OnLayoutChanged(null, Layout);
        }