Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF groupbox visibility by combobox value selected

WPF groupbox visibility by combobox value selected

Scheduled Pinned Locked Moved WPF
csharpwpf
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karthik bandaru
    wrote on last edited by
    #1

    private 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.
    }

    M 1 Reply Last reply
    0
    • K karthik bandaru

      private 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.
      }

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Pray tell me sir, why have you dumped a bunch of code in our forum? See that is a question, it is what we use when trying to get some help in a forum!

      Never underestimate the power of human stupidity RAH

      K 1 Reply Last reply
      0
      • M Mycroft Holmes

        Pray tell me sir, why have you dumped a bunch of code in our forum? See that is a question, it is what we use when trying to get some help in a forum!

        Never underestimate the power of human stupidity RAH

        K Offline
        K Offline
        karthik bandaru
        wrote on last edited by
        #3

        so,can u help me how to do ?

        M 1 Reply Last reply
        0
        • K karthik bandaru

          so,can u help me how to do ?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Can I help you to do what you have not asked a question, explained what you want or described what your problem is. All you have done is dump some poorly written code into the forum. Read the guidelines at the top of the page on how to ask a question! And please don't use txt speak.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups