Created
April 30, 2011 05:58
-
-
Save azyobuzin/949468 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IEnumerable SelectedItems | |
{ | |
get | |
{ | |
return this.selectedItems; | |
} | |
set | |
{ | |
this.selectedItems = value; | |
this.RaisePropertyChanged("SelectedItems");//比較方法がわからないので無条件に発生 | |
StatusViewModel selectedStatus = this.SelectedItem as StatusViewModel; | |
if (selectedStatus != null) | |
{ | |
//ここ | |
this.Items.Cast<object>().AsParallel().ForAll(item => | |
{ | |
StatusViewModel statusItem = item as StatusViewModel; | |
if (statusItem != null) | |
{ | |
statusItem.IsSelectedItemsReply = statusItem.ID == selectedStatus.InReplyToStatusId; | |
statusItem.IsSelectedUser = statusItem.User.ID == selectedStatus.User.ID; | |
statusItem.IsSelectedItemsReplyUser = selectedStatus.Text.Contains("@" + statusItem.User.ScreenName); | |
} | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment