silverlight - MVVMLight Multiple Listbox Selection -


I have an item control for a country model - that looks like this.


Country

ID

String name
- List County


There is a list box in the datatyme of items - which is bound to county property.

So what I want, only one item can be selected in listboxes at any one time. For example: I have selected an item in the first list box and I click on one item in the second list box, there should not be any selected items in the first list box.

Any ideas ??

Add a selected total asset to your country object. After that you can tie the selected item on your property to your ListBox . Then manually set the code to zero to all others in the code. Something like this

  country. OnPropertyChanged + = (s, e) = & gt; {If (e.PropertyName == "SelectedCounty") {foreach (MyCountries in country country) if (Country! = Sender) country. Selected county = null; }}  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -