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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

javascript - addthis share facebook and google+ url -

java - How to create a Servlet Filter in Eclipse in the absence of web.xml? -