I'm making an API which is will be use my chat program.
API core class have a room list like a List<Room> Rooms_;
API core class have a property. public Room[] Rooms { get { return Rooms_.ToArray(); } }
and API core class also have a property which is easily to print room list.
This property is public ObservableCollection<Room> ObservableRooms { get { return new ObservableCollection<Room>(Rooms_); }
Now, when room is added or removed, i coded Add
function and Remove
function like this.
Rooms_.Add(new_room);
Rooms_.Remove(room);
but the ObservableRooms
dosen't change automatically.
I want to bind ObservableRooms
property to the Rooms_
list.
Anyone know this?
Thanks.