Re: Binding to a Function
No, it's only possible to bind to properties.
If you're talking about binding the Button so that it does something when it's clicked without handling its Click event, that can be done using properties. The Button implements the ICommandSource interface, which means that it has a Command property that can be bound to a property whose type implements the ICommand interface. That ICommand object has an Execute method that can do as you like. When the Button is clicked, the Execute method of the bound object is called.
If you're talking about binding the TextBlock then I'd probably suggest binding it to a property of type String and then, when the Button is clicked, modifying the value of that property. You'll probably also want to raise a PropertyChanged event for that property so that the UI knows to update, otherwise you'll have to update the binding explicitly.
By the way, this site has a forum dedicated to WPF. I've asked the mods to move this thread there.
Re: Binding to a Function
Moved to the WPF Forum.
Thanks for the report John :thumb:
Gary