how to disable horizontal scrollbar into pivot control WP7.? - windows-phone-7

I have Image and I am zooming this image as well Draging this image and move around this canvas,
so the canvas is inside the Pivot Control and once I am trying to move from Left to Right so it will goes to the next Pivot Item so I want to stop this horizontal scrollbar into this PivotItem.?
NOTE:
I had tried with Touch.FrameReported but is not worth in my case.
Thanks..!!

You could try the Lockable Pivot control from the Silverlight Toolkit for Windows Phone :-
http://www.windowsphonegeek.com/articles/Windows-Phone-Toolkit-LockablePivot-in-depth

Related

Cube 3D React npm scrolling without a click effect

I am using Cube 3D react and I put some links in the cubes with links ,the problem that I have is when I scroll through different sides of the box if my mouse is still on the square while I end the scrolling it is clicked and the link redirects me ,I want if its possible while I scroll even if I end scrolling and my cursor is still on the side I started to scroll not to be clicked.

Reset (or change Pivot of) an Image in ScrollRect when scaling down

I have a single image that is displayed inside a scrollRect.. pivot is centered and the user is able to scale the image up and down using a slider.. then he/she is able to scroll drag the image around (with the scrollRect functionality) like for example a page in a book-app.. but when the user scales the image up and drags it around and then scales it back down again, the page shrinks at its own pivot point and sometimes gaps are visible on the sides depending on where the user has dragged the image.. When you start to drag the image again it snaps to the correct location but it doesn't look very polished when you force a user to "nudge" something before it snaps into place..
does anybody know of a way to invoke the "nudge" after scaling? Or force the ScrollRect to calculate the position of the image after scaling? I tried using math and pivot points but since the position alters with both scaling and dragging I can't hardcode a value to change pivot points (like f.e. if x < -50 and y < -50 then the pivot point should be top right) ..
The simplest solution would be to invoke that little nudge the user has to do now but I don't know how I have to go about doing it (just changing the transform.positon.x in code doesn't work, the scrollRect needs to update its content) or maybe I could reset the position of the anchor so it stays at the center of the parent..
I tried to clarify with some images:
https://ibb.co/f7Oxk6

How to get div X and Y (top left and bot right) , inside an image

Here is what exactly I am trying to do.
I have an image with square elements inside it. When i click on top left and bottom right corners of those elements they are surrounded with divs with border. I then have functions to drag and resize those divs(once they are created by two clicks). I want to be able to record the resized coordinates of those divs in text boxes. For example if the image is with height=700 and width=500. Then if i create a square div inside it with coordinates top left(x=190,y=150) and bottom right(x=290,y=250). Then if i drag this div around the image i want those coordinates to change accordingly. Same thing to happen if i resize it.
Here i have added the code in a web site. laughter.free.bg/imagemapping/Img1.html What you need to do is click on top left and bottom right corners of one of the snack packs. Then you`ll see a box on the right with the coordinates of this Green bordered div. I want those coordinates to change when i drag or resize this div. You can see the code in the source of the page.
Thanks a lot in advance.
It is possible to bind functions to the resize event through jQuery.
For example, ur kiroid has a class of ui-resizable. You could use something like:
$('.ui-resizable').resize(function() {
// refresh your coords here from $('kiroid').css maby?
})

How to include canvas under panorama page in windows phone?

I have a panorama page with two panorama item and would like to include a canvas inside the second panorama item. So, when I do it, I get a overflow of the first panorama item in my canvas. As it should be made such that it takes around one and half page. So it should be like 2 and a half panorama page with two items a panorama item and a canvas item.
Make sure all the margin values are zero. Sometimes, Expression Blend will add margins to a child control to fit into the ItemTemplate of the panorama control. Remember a Canvas doesnt act like other components, it's contents are mapped to the pixel.
Also, if you are looking to make an item 1.5 page widths, consider changing the panorama item's orientation to horizontal.
Maybe put another canvas under the grid in your second panorama item?

How to know if the element is on the screen?

I have a horizontal ListBox with Images, which are pretty big and take 80% of the screen. User scrolls through this ListBox and images change quickly, and I'd like to highlight the image which is actually on the screen. What is the best way to do it?
Personally, I would use the class proposed by AnthonyWJones in this topic:
Restoring exact scroll position of a listbox in Windows Phone 7
The idea remains the same. You'll just change the vertical listbox to horizontal listbox.
Thus, you can recover the exact position of your listbox.

Resources