Answers for "how to search and filter usercontrols in a panel"

0

how to search and filter usercontrols in a panel

private textBoxTextChanged(obj sender, EventArgs e)
{
    foreach(UserControl uc in flowLayoutPanel.Children)
    {
        if(!uc.Text.Contains(textBox.Text) && !uc.Description.Contains(textBox.Text))
        {
            uc.Visibility = Visibility.Collapsed;
        }
        else
        {
            //Set Visible if it DOES match
            uc.Visibility = Visibility.Visible;
        }
    }
}
Posted by: Guest on April-06-2022

Code answers related to "how to search and filter usercontrols in a panel"

Browse Popular Code Answers by Language