WPF InotifyPropertyChanged and view models
Posted
by Joel Barsotti
on Stack Overflow
See other posts from Stack Overflow
or by Joel Barsotti
Published on 2010-05-13T23:49:48Z
Indexed on
2010/05/13
23:54 UTC
Read the original article
Hit count: 204
So I think I'm doing something pretty basic. I know why this doesn't work, but it seems like there should be a straight foward way to make it work.
code:
private string fooImageRoot;
// ....
public BitmapImage FooImage
{
get
{
URI imageURI = new URI(Path.Combine(fooImageRoot, CurrentFooTypes.FooObject.FooImageName));
return imageURI;
}
}
So CurrentFOoTypes and FooObject also supports INotifyPropertyChanged.
So If I bind a TextBlock to CurrentFooTypes.FooObject.FooImageName, if either fooObject or FooImageName change the textblock updates. How can I subscribe my viewmodel object to recieve updates in a similiar fasion.
© Stack Overflow or respective owner