tags:

views:

85

answers:

1

Hi,

How to call a call method from xaml in wpf?

Thanks in advance

+4  A: 

The typical way this is handled is by wrapping your method into an ICommand, and using the Commanding infrastructure in WPF.

I blogged about Commanding, showing some of the advantages of this approach, especially when you use something like the RelayCommand implementation in Josh Smith's MVVM article.

Reed Copsey
Note that using the commanding infrastructure only executes a method on user interaction. Otherwise read up on xaml triggers.
Andre Luus