public SearchPopup(ListViewEx lv, SearchMode mode) { InitializeComponent(); this.SearchListView = lv; this.Mode = mode; this.TopLevel = false; //this.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.SearchListView.Controls.Add(this); this.Height = GetCorrectHeight(); this.Location = new Point(SearchListView.ClientRectangle.Width - this.Size.Width, SearchListView.ClientRectangle.Height - this.Size.Height); this.SearchListView.Resize += SearchListView_Resize; this.searchBox.ClientSizeChanged += SearchListView_Resize; this.Resize += SearchListView_Resize_test; this.OrigLVIs = SearchListView.Items.OfType <ListViewItem>().ToArray(); filterListView.Items.Clear(); foreach (ColumnHeader header in SearchListView.Columns) { filterListView.Items.Add(new ListViewItem(header.Text) { Tag = header.Index, Checked = true }); } }
private void Items_CountChanged(ListViewEx sender, int count, ObservableListViewItemCollection.Action action) { SearchPopup.UpdateOrigLVIs(Items.OfType <ListViewItem>()); }
public ObservableListViewItemCollection(ListViewEx owner) : base(owner) { this.Owner = owner; }