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. WPF ListView/ItemsControl Drag Drop Adorner

WPF ListView/ItemsControl Drag Drop Adorner

Scheduled Pinned Locked Moved WPF
csharpwpfcomhelp
4 Posts 2 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.
  • S Offline
    S Offline
    snblackout
    wrote on last edited by
    #1

    Hi there, I've found this article by Bea Stollnitz and downloaded the source and converted to vb.net. I believe I have my conversion complete, but one thing is still not working as I've tried to get it and pulled too many hairs out. Hopefully someone can help me spot what I'm missing. Ok, drag & drop works fine in the converted code, I just don't get the InsertionAdorner working in vb.net, I've setup breakpoints in code and all code is being executed, but for the life of me the InsertionAdorner does not become visible. Even the DrawLine functions are being called! I'm at a loss and I need this in vb.net, the original C# project works just fine, I just can't find out what I'm missing! Thanks, Scott

    P 1 Reply Last reply
    0
    • S snblackout

      Hi there, I've found this article by Bea Stollnitz and downloaded the source and converted to vb.net. I believe I have my conversion complete, but one thing is still not working as I've tried to get it and pulled too many hairs out. Hopefully someone can help me spot what I'm missing. Ok, drag & drop works fine in the converted code, I just don't get the InsertionAdorner working in vb.net, I've setup breakpoints in code and all code is being executed, but for the life of me the InsertionAdorner does not become visible. Even the DrawLine functions are being called! I'm at a loss and I need this in vb.net, the original C# project works just fine, I just can't find out what I'm missing! Thanks, Scott

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

      If you want to convert this to VB.NET, use Reflector to open the exe up in Bea's solution (File > Open... pick the file). Then, expand the various items in DragDropListBox and choose Visual Basic in the language combo. Click Space to see the Disassembler window, and choose each class (e.g. Album) in turn. At the bottom of the Disassembler window is a link "Expand Methods" - click this to see the converted code.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      My blog | My articles | MoXAML PowerToys

      S 2 Replies Last reply
      0
      • P Pete OHanlon

        If you want to convert this to VB.NET, use Reflector to open the exe up in Bea's solution (File > Open... pick the file). Then, expand the various items in DragDropListBox and choose Visual Basic in the language combo. Click Space to see the Disassembler window, and choose each class (e.g. Album) in turn. At the bottom of the Disassembler window is a link "Expand Methods" - click this to see the converted code.

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        My blog | My articles | MoXAML PowerToys

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

        Thanks for your reply, I'll give Reflector a go to see if I can see something, but with my experience the code that comes out of reflector can be somewhat cryptic at best. I did supply my attempt at converting the code in my original message, not sure if you downloaded and looked at it, the code I have compiles and runs fine in VB.net, just missing the InsertionAdorner working. Anyone willing to take a look at my already attempt at converting? Thanks, Scott

        1 Reply Last reply
        0
        • P Pete OHanlon

          If you want to convert this to VB.NET, use Reflector to open the exe up in Bea's solution (File > Open... pick the file). Then, expand the various items in DragDropListBox and choose Visual Basic in the language combo. Click Space to see the Disassembler window, and choose each class (e.g. Album) in turn. At the bottom of the Disassembler window is a link "Expand Methods" - click this to see the converted code.

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          My blog | My articles | MoXAML PowerToys

          S Offline
          S Offline
          snblackout
          wrote on last edited by
          #4

          Got it, with the help of Reflector. The online converter took this code

          pen = new Pen { Brush = Brushes.Gray, Thickness = 2 };

          and spit out

          pen = New Pen()

          conveniently leaving out the

          pen.Brush = Brushes.Gray
          pen.Thickness = 2

          and a couple other conversions that I had to fix that were similar. The converter could of done:

          pen = New Pen() With {.Brush=Brushes.Gray, Thickness=2 }

          but to play it safe because VS08 only supports that it just left it out.. Problem fixed!

          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