How to enable a radio button based on combo box item in wpf -


i have combo box having 5 items , have 2 radio buttons. want enable first radio button if first item selected in combo box unless second radio button must enabled. how can in wpf? can me?

you need subscribe combobox selectionchanged event , in can this:

  private void cmb_selectionchanged(object sender, selectionchangedeventargs e)     {         var combo = sender combobox;         if (combo.selectedindex == 0)             rad1.ischecked = true;         else             rad2.ischecked = true;     } 

here rad1 , rad2 radio buttons defined in xaml.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -