public frmGoToAll(bool allowOutOfScope, bool showFilesAndConstants) { InitializeComponent(); Icon = Properties.Resources.Find; _symbolProvider = DebugWorkspaceManager.GetSymbolProvider(); _allowOutOfScope = allowOutOfScope; _showFilesAndConstants = showFilesAndConstants; tlpResults.SuspendLayout(); for (int i = 0; i < MaxResultCount; i++) { ctrlSearchResult searchResult = new ctrlSearchResult(); searchResult.Dock = DockStyle.Top; searchResult.BackColor = i % 2 == 0 ? SystemColors.ControlLight : SystemColors.ControlLightLight; searchResult.Visible = false; searchResult.Click += SearchResult_Click; searchResult.DoubleClick += SearchResult_DoubleClick; tlpResults.Controls.Add(searchResult, 0, i); tlpResults.RowStyles.Add(new RowStyle(SizeType.AutoSize)); _results.Add(searchResult); } tlpResults.ResumeLayout(); UpdateResults(); }