Skip to content

Instantly share code, notes, and snippets.

@azyobuzin
Created April 30, 2011 05:58
Show Gist options
  • Save azyobuzin/949468 to your computer and use it in GitHub Desktop.
Save azyobuzin/949468 to your computer and use it in GitHub Desktop.
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