c# - Change UI-layout based on selected ComboBoxItem -


i have combobox this:

<combobox>         <comboboxitem>combobox item #1</comboboxitem>         <comboboxitem>combobox item #2</comboboxitem>         <comboboxitem>combobox item #3</comboboxitem> </combobox> 

and below have grid, rest of ui is. , wanted ask best way display other ui each of items.

like "item #1" i'd have radio button , text field , "item #2" id display data in textblock, ... (note: combobox should stay @ same position switch)

i'm not quiet sure how implement right mvvm-model , didn't find useful problem in internet far.

i got work due of highcores comment. looked @ link tabcontrol , transfered combobox.

so xaml looks this:

    <combobox name="routeoptions"               itemssource="{binding}"               displaymemberpath="displayname"/>      <contentpresenter                content="{binding selecteditem, elementname=routeoptions}"/> 

and rest followed instructions of answer of mentioned link.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -