0
votes

does anybody know of any usercontrol that would function well as a textbox for entering email recipients.

The control would appear as a simple textbox. When a user would enter some text a drop down list of matches would be displayed. When he would select an item from the list, this item would be added to the textbox. If the user would then continue adding some new text, new list of matches would be shown, etc.

A visual example of what I'd like:

alt text

Does anybody know of any usercontrol that can do this? Any ideas how to implement it? Thanks, gregor

1

1 Answers

1
votes

So no single control is going to do it immediately, although you can end up exposing it to your application as a single UserControl.

It looks to me like you're after:

<StackPanel>
    <ItemsControl>
        <ItemsControl.ItemTemplate>
            ...your styling of those email addresses
        </ItemsControl.ItemTemplate>
    </ItemsControl>
    <ComboBox TextChanged="yourHandlerToChangeTheBackingObservableCollectionWhichIsTheItemsSourceOfTheEmailItemsControl">
    </ComboBox>
</StackPanel>

and the appropriate backing stuff - an ObservableCollection of email addresses, whatever data converters you need etc.

A ComboBox, to make a comparison, is just strung together out of a TextBox, a Button and a Popup.

Good luck!