Is there a control in Silverlight which act like the TO text box in email composers
which when you start typing it gives you a list of contacts and when select one and start type again will give you the contact list to select another email address (multi email addresses selection)?
You want the AutoCompleteBox
You set up an ItemsSource to be the possible e-mail addresses and when the user starts typing it will search against this list and suggest matches. So in your scenario you'd need to read the address book to populate this list.
You don't have to bind to a list of strings, it allows you to bind to an object and display and match against the human readable representation of that object.
Related
I would like to generate combobox items dynamically during run time. I have a combobox called Camera and say if I have 10 cameras connected then I want to name each camera as "Camera_0", "Camera_1", "Camera_2"..., and "Camera_9" and display them in the combo box.
I want to leverage a for loop to append a string to store each camera string name in an array so that I can display in the combobox.
Thanks
Build an array of strings first and then write to the "Strings[]" property of the combo box using a reference or a property node.
Edit: original snippet was wonky due to the property node. Just wire your combo box reference to the "Combo Box" node there and you're all set.
I need help regarding my project:
I am trying to make a Billing system like this
https://www.youtube.com/watch?v=cKDvSnL1nFE
but a windows desktop application.
the idea is: when the user enters product code/Id it it retrieves the products and associated information (i.e product name and price) from the database and adds in the list.
I have no idea which control to use for the list, List View or Grid View or something else.
I recommend use GridView because you have more control of your data,
then you will assign a event to cells for refresh all product information;
the event to use will be CellValueChanged.
I have an msoControlComboBox item in an Outlook 2007 command bar. I am able to add items to the combo box dropdown, and if the user types something in the textbox that matches the beginning of any words in the dropdown, then the combobox suggests the rest of the word, inside the text box.
I would like to do a little better than that.
I would like to be able to detect keypress events, and add/remove items from the dropdown list based on the characters the user has entered so far.
I would also like to be able to dropdown the list programatically (right now the only to drop it down appears for the user to click on the dropdown arrow).
Is there a way to accomplish these two objectives (in c#).
There is no out of the box microsoft control that can do it.
You aren't the first person to want this however and I personally used a control found here and found it to be a good starting point for my needs. It's aimed at finding in email addresses but it can be adapted to other needs. It uses regexp searches to find matches
Requirement:
1. Show a list of all referral types in a combo box. (eg. Newspaper, Yellow Pages, Client)
2. Upon choosing client, a popup is shown where they can search for clients within the system.
3. From the popup, the user can choose one client.
4. Popup will be dismissed and the client name will be populated into the combobox.
I'm almost done with the implementation, wherein requirements 1 thru 3 are done. However, I'm stuck with number 4. The reason is that, the combobox is bound to referraltype objects. However, the chosen item from the popup is of type "client". Right now, I'm just displaying the chosen client in a separate textblock. However, the customer wants it to be displayed as part of the combobox itself.
Not sure how it could be done.
Any help would be appreciated.
Thanks
Bala
You could have a BaseReferralTypeViewModel which NewspaperViewModel, YellowPagesViewModel and ClientViewModel all inherit from. In the combo box resources in xaml declare DataTemplates which describe how to display these types in the combo box. In the case of the first two types its probably just a text block.
In the case of the ClientViewModel create an instance but don't initialise it with any client data.
The DataTemplate can detect this and just display the referral type.
Once the ClientViewModel is initialised with client data by the popup the DataTemplate will detect this and display the name.
Question: How can you pass an instance of an object from the view model to a converter along with the value to be converted to a converter?
Info: I'm working on an inventory program for people on our factory floor who receive incoming shipments. While receiving a shipment they will mark down who the shipping company was and who the driver was. To do this I want to have set up a pair of combo boxes. When they select the shipper combo box and select the shipper the driver combo box will reflects this change.
My plan is to have a list of shippers (who have a list of drivers) in my ShipmentViewModel that the shipper combo box binds to. This list of shippers is only a list of GUID that i pull up from the database. the shipment's shipper will have a separate property for the shipper that is selected as well as the driver selected.
What I would like to do is pass the instance of the shipper list to the converter along with the GUID of the shipper(Gotten from the ShipmentVM). The converter compares the GUID to the list of shippers and returns to the combo box a instantiation of the ShipperVM. the driver combo box is the bound to the ShipperVM's list of drivers. Pass this list along with the driver's GUID(Also gotten from the ShipmentVM) to another converter which returns the driver's name.
I'm programing in Visual Basic and XAML according to the M-V-VM schema.
P.S. Saying "You can't pass more than 1 argument to a converter." is a totally legitimate response. I just need confirmation. I'm starting to think that this is the case...
If you need to pass multiple "things" to a converter, what you actually want is a MultiValueConverter, which can accept N number of input values.
http://msdn.microsoft.com/en-us/library/system.windows.data.imultivalueconverter.aspx