I try to migrate my iphone app to wp7.
On ios, UITableview is well designed, and very easy to code.
I have the some book about wp7, but there are no detail concerned about moving and removing of a row of listbox.
Welcome any comment
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d like to think that Windows Phone is also well designed. 🙂
To simply remove an item from a
ListBoxin your codebehind, you need to get a reference to theListItemthat you want to remove. For example, to remove the currently selected item:Then you can remove it with:
In order to address your question about moving items, we’d need to know more about how you’re populating the
ListBox. Are you using databinding, or adding items withmyListBox.Items.Add(myListItem)?If I needed to move items between two lists, I would create a public
List<MyItem>property for each list and databind each list to its ownListBox. Then I might do something like this (working from memory here):There’s a much better way to do this, using
INotifiyPropertyChanged, but I suspect you need to play around with the basics for a while to get comfortable in C#.Bonus tip: Windows Phone is very similar to Silverlight, and you can usually find more information if you search for Silverlight examples.