c# - Search through Tab Control for specific Tab Item based on a String value -
i know how select tabitem in tabcontrol name matches specific string value. i'm guessing have sort of search.
here's visual example:
string selectedtabitem = "tabitem"; //if there exists tab item in specific tab control //with above string it's name //that tab item .isselected = true;
assuming create tabs manually, , not via bindings, should work:
tabcontrol.selecteditem = tabcontrol.items.oftype<tabitem>().singleordefault(n => n.name == selectedtabitem);
Comments
Post a Comment