WPF Binding to code behind methods
Posted
by Matt B
on Stack Overflow
See other posts from Stack Overflow
or by Matt B
Published on 2010-03-29T13:14:57Z
Indexed on
2010/03/29
14:33 UTC
Read the original article
Hit count: 300
Hi all,
This is annoying - I know how I'd do it in web...
I have a wpf image and I want to bind it's source property to a method, and pass in a property from it's bound item.
IE.
<image source="GetMySource({binding name})" />
Where GetMySource is
protected string GetMySource(string name)
{
return "images/"+name+".png";
}
© Stack Overflow or respective owner