so,can u help me how to do ?
karthik bandaru
Posts
-
WPF groupbox visibility by combobox value selected -
WPF groupbox visibility by combobox value selectedprivate void combogroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
{------binded combobox
category ca = new category();
strCurCatGroup = combogroup.SelectedValue.ToString().Trim();
ca.changecategory(strCurCatGroup);//change category is my method}
private void changecategory(string strCategoryGroup)
{switch(---)
{
case "A":
groupbox1.visibility=Visibility.Hidden;
groupbox2.visibility=Visibility.Visible;--
case "B":groupbox1.visibility=Visibility.Visible;
groupbox2.visibility=Visibility.Hidden
//groupbox 1 and grpbox 2 contain different controls and i am able to execute the cases properly but the result is not getting.
} -
Groupbox visibility problem in WPF after debugging and changing the combobox valueshould I set all the groupboxes visible or hidden in pageload ? I have taken grid inside the groupboxes and arranged my controls like textboxes.. If I make groupboxes visible in pageload then while debugging it is showing all the controls in Groupboxes but combo selection change event not working.
-
Groupbox visibility problem in WPF after debugging and changing the combobox valuethank u .. i will try and reply u
-
Groupbox visibility problem in WPF after debugging and changing the combobox valueok Thank you but my form contains so many groupboxes which will be changed as per selecting the combo items.. I appreciate your help. :) Any other method of writing it in codebehind by using a switch case will be helpful.
-
Groupbox visibility problem in WPF after debugging and changing the combobox valueThanks for ur reply but i have so many items in combobox by which groupbox visibily will depend.. nearly 10 items in combobox
-
Groupbox visibility problem in WPF after debugging and changing the combobox valueI need to change my groupbox visibility and I should be able to get those controls in the groupbox1 ,when I change my combobox value in the combobox selectionchange event groupbox2 and its controls should be shown.. line by line execution shows the result i was looking but finally am not able to get the output . This is what I have tried but didn't work for me. Need ur help. if(stringgp1=="group1") { groupbox1.Visibility=Visibility.Visible; groupbox2.visibility=visibility.hidden; } else(something...){}
karthik