title: Passing object to viewmodel
body: <p>Question on the MVVM pattern where I think I have it wrong.</p>
  
  <p>When a touchdown event occurs in a view I want to popup a message i.e.:</p>
  
  <pre><code>private void marker_TouchDown(MessageObject msgData)
  {
      CustomMessageControl message = new CustomMessageControl() {Width = 610, Height = 332};
      CustomMessageViewModel messageVM = new CustomMessageViewModel(msgData);
      message.DataContext = messageVM;
      //Add to canvas
  }
  </code></pre>
  
  <p>My viewmodel:</p>
  
  <pre><code>public class CustomMessageViewModel
  {
      public MessageObject message { get; set; }
  
      public CustomMessageViewModel(MessageObject message)
      {
          this.MessageObject = message;
      }
  }
  </code></pre>
  
  <p>This works but doesn't feel right. Is this an acceptable way to populate the view model? </p>