Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Proper way to do MouseDoubleClick in MVVM

Proper way to do MouseDoubleClick in MVVM

Scheduled Pinned Locked Moved WPF
questionwpfregexarchitecture
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Ceder
    wrote on last edited by
    #1

    OnMouseDoubleClick from a selectedItem in a listview, I want to retrieve the parent of that selectedItem, and from that, populate several related listviews with the related records. What is the best way to do this using the MVVM pattern without polluting the view with too much code-behind?

    M S P 3 Replies Last reply
    0
    • D David Ceder

      OnMouseDoubleClick from a selectedItem in a listview, I want to retrieve the parent of that selectedItem, and from that, populate several related listviews with the related records. What is the best way to do this using the MVVM pattern without polluting the view with too much code-behind?

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      I hope you get a response for this as I'm a polluter, I use code behind and pass the info to the datacontext :-O

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • D David Ceder

        OnMouseDoubleClick from a selectedItem in a listview, I want to retrieve the parent of that selectedItem, and from that, populate several related listviews with the related records. What is the best way to do this using the MVVM pattern without polluting the view with too much code-behind?

        S Offline
        S Offline
        SledgeHammer01
        wrote on last edited by
        #3

        The generally accepted solution is to use something like EventToCommand.

        1 Reply Last reply
        0
        • D David Ceder

          OnMouseDoubleClick from a selectedItem in a listview, I want to retrieve the parent of that selectedItem, and from that, populate several related listviews with the related records. What is the best way to do this using the MVVM pattern without polluting the view with too much code-behind?

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          I'm pretty sure I told you how to do it when I answered you here[^].

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups