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. Three ScrollViewers

Three ScrollViewers

Scheduled Pinned Locked Moved WPF
designtutorialquestion
2 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.
  • P Offline
    P Offline
    pix_programmer
    wrote on last edited by
    #1

    Hi! I've added a Scrollviewer to my Screen. Inside the scrollviewer, I've added a scrollpanel and inside which a set of images. I've added the functionality for the tap event of the scrollpanel. I've to add two more sets of scrollviewer, scrollpanel and images(different ones from the first set of images) to the same screen. The functionality for the second and third set of scrollviewer is same with the first one. How to add these two more new scrollviewers? I can't use the same name for these three scrollpanels. How to design so that the existing code can be used for the new scrollviewer and scrollpanel sets also?

    L 1 Reply Last reply
    0
    • P pix_programmer

      Hi! I've added a Scrollviewer to my Screen. Inside the scrollviewer, I've added a scrollpanel and inside which a set of images. I've added the functionality for the tap event of the scrollpanel. I've to add two more sets of scrollviewer, scrollpanel and images(different ones from the first set of images) to the same screen. The functionality for the second and third set of scrollviewer is same with the first one. How to add these two more new scrollviewers? I can't use the same name for these three scrollpanels. How to design so that the existing code can be used for the new scrollviewer and scrollpanel sets also?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Create a UserControl that contains a ScrollViewer, etc. and the event handling code. Then add as many of these UserControls to your "screen" as you need. Customize each UserControl by setting the appropriate properties (eg. image paths).

      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