IIS Express 7.5 Improves ASP.NET Development

If you suffer the pain of using the ASP.NET Development Server (Cassini) and would like an alternative take a look at this post. The full download is available here.

INotifyDataErrorInfo & Silverlight 4

Mike’s post provided me with a very useful solution.

Silverlight events and the CallMethodAction

I have been using the CallMethodAction behavior to call specific methods when an event is raised. The CallMethodAction can call either:

  1. A public method that takes no arguments and returns no value
  2. A public method whose signature matches that of the event handler

I had used the first option a couple of times quite successfully but had difficulty getting the second option to work using the DisplayDateChanged event for a DatePicker control. That was until I came across this post which provided me with the necessary pointers to get my DisplayDateChanged event to work. I just needed to ensure:

  • The signature of my method matched that for the DisplayDateChanged event handler (of course)
  • The method needed to be listed in the ViewModel I was using for the DataContext of the DatePicker control

So my markup code for the DatePicker looks like this:

<telerik:RadDatePicker .... >
  <i:Interaction.Triggers>
    <i:EventTrigger EventName="DisplayDateChanged">
      <ei:CallMethodAction MethodName="SetRadioButtons" 
        TargetObject="{Binding}" />                                           
    </i:EventTrigger>
  </i:Interaction.Triggers>
</telerik:RadDatePicker>

And the ViewModel code for my SetRadioButtons method is declared as:

public void SetRadioButtons(object sender, CalendarDateChangedEventArgs e)