18. dubna 2012 12:27
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?
18. dubna 2012 14:58You can either create custom attached properties for the functionality you described, and used them on all three, or create a UserControl as described and use it 3 times. Attached Properties is the cleanest approach IMO.
- Označen jako odpověď Annabella LuoModerator 4. května 2012 8:13
4. května 2012 8:13ModerátorWe are temporarily marking this as "Answer", if you have any concerns or new findings; please feel free to let me know.
MSDN Community Support | Feedback to us