title: MVVM Passing EventArgs As Command Parameter
body: <p>I'm using Microsoft Expression Blend 4<br>
  I have a Browser ..,  </p>
  
  <p><strong>[ XAML ]</strong> ConnectionView " Empty Code Behind "</p>
  
  <pre><code>        &lt;WebBrowser local:AttachedProperties.BrowserSource="{Binding Source}"&gt;
              &lt;i:Interaction.Triggers&gt;
                  &lt;i:EventTrigger&gt;
                      &lt;i:InvokeCommandAction Command="{Binding LoadedEvent}"/&gt;
                  &lt;/i:EventTrigger&gt;
                  &lt;i:EventTrigger EventName="Navigated"&gt;
                      &lt;i:InvokeCommandAction Command="{Binding NavigatedEvent}" CommandParameter="??????"/&gt;
                  &lt;/i:EventTrigger&gt;
              &lt;/i:Interaction.Triggers&gt;
          &lt;/WebBrowser&gt;  
  </code></pre>
  
  <p><strong>[ C# ]</strong> <em>AttachedProperties class</em>  </p>
  
  <pre><code>public static class AttachedProperties
      {
          public static readonly DependencyProperty BrowserSourceProperty = DependencyProperty . RegisterAttached ( "BrowserSource" , typeof ( string ) , typeof ( AttachedProperties ) , new UIPropertyMetadata ( null , BrowserSourcePropertyChanged ) );
  
          public static string GetBrowserSource ( DependencyObject _DependencyObject )
          {
              return ( string ) _DependencyObject . GetValue ( BrowserSourceProperty );
          }
  
          public static void SetBrowserSource ( DependencyObject _DependencyObject , string Value )
          {
              _DependencyObject . SetValue ( BrowserSourceProperty , Value );
          }
  
          public static void BrowserSourcePropertyChanged ( DependencyObject _DependencyObject , DependencyPropertyChangedEventArgs _DependencyPropertyChangedEventArgs )
          {
              WebBrowser _WebBrowser = _DependencyObject as WebBrowser;
              if ( _WebBrowser != null )
              {
                  string URL = _DependencyPropertyChangedEventArgs . NewValue as string;
                  _WebBrowser . Source = URL != null ? new Uri ( URL ) : null;
              }
          }
      }
  </code></pre>
  
  <p><strong>[ C# ]</strong> <em>ConnectionViewModel Class</em> </p>
  
  <pre><code>public class ConnectionViewModel : ViewModelBase
      {
              public string Source
              {
                  get { return Get&lt;string&gt; ( "Source" ); }
                  set { Set ( "Source" , value ); }
              }
  
              public void Execute_ExitCommand ( )
              {
                  Application . Current . Shutdown ( );
              }
  
              public void Execute_LoadedEvent ( )
              {
                  MessageBox . Show ( "___Execute_LoadedEvent___" );
                  Source = ...... ;
              }
  
              public void Execute_NavigatedEvent ( )
              {
                  MessageBox . Show ( "___Execute_NavigatedEvent___" );
              }
      }
  </code></pre>
  
  <p><strong>[ C# ]</strong> <em>ViewModelBase class</em>  <a href="http://viewmodelsupport.codeplex.com/">Here</a></p>
  
  <p>Finally :<br>
  Binding with commands works well and MessageBoxes shown </p>
  
  <hr>
  
  <p><strong>My Question :</strong><br>
  How to pass <em>NavigationEventArgs</em> as Command Parameters when Navigated Event occurs ?</p>