I have a wpf-mvvm application.
I have an observable collection in my viewmodel
public ObservableCollection<BatchImportResultMessageDto> ImportMessageList { get; set; }
"BatchImportResultMessageDto" contains two properties..
result type..and message. Result type can be success or failure.
I need to display success in one list box ..and failure in another listbox.
I can do this..by having 2 observable collections in viewmodel to hold success/failure.
public ObservableCollection<BatchImportResultMessageDto> ImportFailureMessageList { get; set; } // To hold the failure messages.
public ObservableCollection<BatchImportResultMessageDto> ImportSuccessMessageList { get; set; } // To hold the sucess messages.
But is there any other better way so that i can filter it (without new two collections) ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…