Is it possible to bind an Event in a Silverlight DataTemplate?

后端 未结 2 504
傲寒
傲寒 2021-02-08 00:44

Is it possible to bind an Event in a Silverlight DataTemplate? If so, what is the best way to do it?

For example, say you\'ve created a DataTemplate that has a Button in

2条回答
  •  情深已故
    2021-02-08 01:05

    What I would do is create a button that uses the command pattern for click handling. In the .NET 4 framework you can bind commands to those that exist on the view model.

提交回复
热议问题