Пример #1
0
        public RecentRepositoriesListBox()
        {
            Columns.Add(new CustomListBoxColumn(0, Resources.StrName, true)
            {
                SizeMode = ColumnSizeMode.Fill
            });

            HeaderStyle = HeaderStyle.Hidden;
            _dragHelper = new DragHelper();
        }
Пример #2
0
        public LocalRepositoriesListBox()
        {
            Columns.Add(new CustomListBoxColumn(1, Resources.StrName, true)
            {
                SizeMode = ColumnSizeMode.Fill
            });

            HeaderStyle = HeaderStyle.Hidden;
            ItemHeight = SystemInformation.IconSize.Height + 4;
            AllowDrop = true;
            _dragHelper = new DragHelper();
        }
Пример #3
0
        /// <summary>Create <see cref="CustomListBox"/>.</summary>
        public CustomListBox()
        {
            _items = new CustomListBoxItemsCollection(this, null);
            _items.Changing += OnItemsChanging;
            _items.Changed += OnItemsChanged;

            _columns = new CustomListBoxColumnsCollection(this);
            _columns.Changed += OnColumnsChanged;

            _selectedItems = new CustomListBoxSelectedItemsCollection(this);
            _selectedItems.Changed += OnSelectedItemsChanged;

            _itemPlainList = new List<CustomListBoxItem>();

            _processOverlay = new ProcessOverlay(this);
            _processOverlay.Renderer = Style.OverlayRenderer;

            _itemHover = new TrackingService<CustomListBoxItem>(OnItemHoverChanged);
            _itemFocus = new TrackingService<CustomListBoxItem>(OnItemFocusChanged);
            _headerHover = new TrackingService<CustomListBoxColumn>(OnHeaderHoverChanged);
            _headerDragHelper = new DragHelper();

            _showRootTreeLines = true;
            _allowColumnReorder = true;
            _integralScroll = true;
            _lastClickedItemIndex = -1;
            _draggedHeaderIndex = -1;
            _columnHeaderHeight = DEFAULT_ITEM_HEIGHT;
            _itemHeight = DEFAULT_ITEM_HEIGHT;

            _renderer = Style.ListBoxRenderer;

            BackColor = Renderer.BackColor;
            ForeColor = Renderer.ForeColor;

            _tooltip = new ToolTip()
            {
                InitialDelay = 350,
            };
        }