Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am really do not know how to write drag event for web browser control on window phone 7. I want to get location of the begin and the end of drag event on web browser control so that i can know user moves up or down or left or rigth or up-left or right-down....
But i have no idea how to write because most of my information did not work.
please some one give me an advice.
Please help me.
Thank for reading and helping me in advance.
Posted
Comments
Stephen Hewison 11-Jun-12 7:23am    
Hi, I could interpret your question a few ways. Are you looking to allow the user to drag an object across the page, are you looking know when the user scroll the content within the web browser or are you looking to capture gestures similar to the swipe gestures often used on mobiles?
Tokisan 11-Jun-12 7:36am    
I am looking for knowing when the user scroll the content within web browser.
Actually, i am working with Google map API, and i want to know when user drag the map up or down or left-up or else by getting drag event's beginning position and it's the end position.
Sorry for my bad English.
Please help me.
Thank a lot.

1 solution

In HTML where an element contains scroll bars. You can write code which is called when these events fire using the following:

XML
<div  önscroll="dosomething();"></div>


You can also add a event listener using javascript:

JavaScript
object.addEventListener ("scroll", handler, useCapture);


The following is good article which discusses the onscroll event.

http://help.dottoro.com/ljurkcpe.php[^]
 
Share this answer
 
v2
Comments
Tokisan 12-Jun-12 6:43am    
Excuse me, could u please teach me about capturing gestures too??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900