Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SmoothPanel"/> class.
        /// </summary>
        public SmoothPanel()
        {
            var templates = new ObservableCollection <SmoothPanelTemplate>();

            templates.CollectionChanged += Templates_CollectionChanged;
            SetValue(_templatesPropertyKey, templates);
            _children = new SmoothPanelChildren(this);
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmoothPanelMeasurer"/> class.
 /// </summary>
 /// <param name="panel">The panel.</param>
 /// <param name="availableSize">The available size.</param>
 public SmoothPanelMeasurer(SmoothPanel panel, Size availableSize)
 {
     _panel         = panel;
     _children      = panel._children;
     _items         = _children.GetItems();
     _keepFirstItem = FirstItemIndex >= 0;
     _lastItemIndex = -1;
     _availableSize = availableSize;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmoothPanel"/> class.
 /// </summary>
 public SmoothPanel()
 {
     var templates = new ObservableCollection<SmoothPanelTemplate>();
     templates.CollectionChanged += Templates_CollectionChanged;
     SetValue(_templatesPropertyKey, templates);
     _children = new SmoothPanelChildren(this);
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmoothPanelMeasurer"/> class.
 /// </summary>
 /// <param name="panel">The panel.</param>
 /// <param name="availableSize">The available size.</param>
 public SmoothPanelMeasurer(SmoothPanel panel, Size availableSize)
 {
     _panel = panel;
     _children = panel._children;
     _items = _children.GetItems();
     _keepFirstItem = FirstItemIndex >= 0;
     _lastItemIndex = -1;
     _availableSize = availableSize;
 }