title: Command Parameter with RelayCommand
body: <p>I'm using a version of the common RelayCommand class and trying to pass a command parameter but not having success. I get the following error:</p>
  
  <p><code>Error 29 Method 'Private Sub KeyPadPressExecute(param As Object)' does not have a signature compatible with delegate 'Delegate Sub Action()'.</code></p>
  
  <p>I've looked at the many examples of using parameters with commands, but I can't make sense out of them. I don't understand where I'm supposed to get the parameter from that will be passed on to <code>KeyPadPressExecute()</code>.</p>
  
  <p>Here's the relevant code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub KeyPadPressExecute(param As Object)
      Debug.Print(param.ToString)
  End Sub
  Private Function CanKeyPadPressExecute() As Boolean
      Return True
  End Function
  Public ReadOnly Property KeyPadPress() As ICommand
      Get 'Error occurs on next line
          Return New RelayCommand(AddressOf KeyPadPressExecute, AddressOf CanKeyPadPressExecute)
      End Get
  End Property
  </code></pre>
  
  <p>What my XAML looks like:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Button Command="{Binding KeyPadPress}" CommandParameter="1" Width="84"&gt;&lt;/Button&gt;
  </code></pre>
  
  <p>I'm using VS 2012 and targeting .NET 4.5.</p>
  
  <p><strong>Note:</strong> My original post said I was using MicroMVVM. Closer inspect of the project indicates that the assembly named MicroMVVM is not related to the MicroMVVM framework hosted at codeplex. This project was started by someone else, thus the confusion.</p>