TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shanthosh Siva
NA
107
15.4k
Two observal collection to remove an item
Mar 16 2019 2:18 AM
I have a two view model, if i want to delete a item in one model it may affect another model but both having same id..
Using two observal collection i want to remove item with same id's.
Note: C# Code
private void WindowSize_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
if (WindowSize[e.NewStartingIndex].WindowSizeId == 0)
WindowSize[e.NewStartingIndex].WindowSizeId = WindowSize.Max(x => x.WindowSizeId) + 1;
WindowSize[e.NewStartingIndex].PropertyChanged += WindowSettingProjectViewModel_PropertyChanged;
}
else if(e.Action==NotifyCollectionChangedAction.Remove)
{
////
HERE i want to write a code by matching two collection to with same ID
}
}
Reply
Answers (
3
)
Creating copy of uploaded file
Which one is best Designing Framework for Windows Forms