This project is read-only.

Binding to methods

There is no difference in binding. For methods you need to bind to an ICommand Interface and since the DynamicViewModel can invoke methods on the model (with or withour args) you can use CommandBindings.

Adding CommandBindings from XAML:
         Command="{x:Static m:ContactView.ClearNamesCommand}" />
         Command="{x:Static m:ContactView.NavigateUriCommand}" />
Binding a button click to a method with no arguments:
     Content="Clear Names"
     Command="{x:Static m:ContactView.ClearNamesCommand}" />
Binding a hyperlink to a method passing the an argument via CommandParameter:
    Command="{x:Static m:ContactView.NavigateUriCommand}"

Last edited Dec 18, 2010 at 5:28 PM by baxevanis, version 7


No comments yet.