0

I have the task of replacing basic ComboBox and its items with a more pleasing UI design.

I have to be able to allow the user to select (a) a single item in one case or (b) several in another (essentially the user is building a query using (a) a simple "=" or (b) the operator "in" according to their wishes.

I think creating a PopUp with an ItemsControl/WrapPanel would be the best solution starting with this:

    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <WrapPanel></WrapPanel>
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>

Screenshot This shows roughly how it should look

My question is how to solidly allow this to accept one single selected item at a time to cover situation (a) above. I'd like a "SelectedItem" property I suppose.

(In situation (b) I plan to use Checkboxes).

Many thanks.

miriyo
  • 103
  • 1
  • 11

1 Answers1

0

Use ListBox with SelectionMode.Single and WrappPanel as ItemsPanel