This question already has answers here:
How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit
(3 answers)
Closed 2 years ago.
I'm having problems with horizontal scrolling inside Pivot control in WP7. I have a Grid with ScrollViewer and ten or more buttons inside. Since all buttons don't fit on the screen i need to be able to horizontally scroll. But when i click and drag on buttons the whole Pivot page starts moving and eventually switches to next pivot page. (buttons inside ScrollView also scroll but only for short distance)
Can I somehow disable Pivot page switching when I click inside ScrollView?
It's not a good idea from a user experience perspective to have a horizontal scroll on top of a control that also slides horizontally. I don't know how you'd go about absorbing the manipulation events within the scroll viewer, without affecting the pivot control but, personally, I would rethink the design. Could your ScrollViewer scroll vertically instead, or possibly on another page, but is accessed via the Pivot control?
I want you to re-evaluate your User experience on this UI since that is not a recommended experience as per the Guidelines. Recommend to consider Panorama control for such a case you referring above.
Solution: http://blogs.msdn.com/b/luc/archive/2010/11/22/preventing-the-pivot-or-panorama-controls-from-scrolling.aspx?wa=wsignin1.0
I use this for Slider in Pivot and Pivot in Pivot
Related
I have a list and its scroll bar on the right along with two custom buttons representing upscroll and downscroll. These two buttons simulate scrolling by using list.setSelectedIndex(index, true) and are placed above and below my scrollbar via my custom layout.
I have two questions regarding this:
1). Since the upscroll and downscroll buttons are overlayed on top of the list, they disappear when i click elsewhere..and they kind of flash into appearance when i click the area it's supposed to be in. How can I remedy this behavior?
2). I have a scrollbar image that I have used in the "Scroll" theme in the GUI builder. It's alignment is IMAGE_ALIGNED_CENTER. However the scroll thumb doesn't reach the end of the bar when i scroll to the end of the list via my upscroll and downscroll buttons. The upscroll and downscroll buttons essentially scroll the list by one index with each press (using setSelectedIndex(index, true)).
Thanks
How do you overlay the buttons. I'm assuming you just set them into a specific location which disallowed as we can't possibly adapt them to the various resolutions. I suggest reading the developer guide section on layouts very carefully.
To place something on top of the list in a portable way you need to use the LayeredLayout or the LayeredPane and a Container + correct layout to position this within (e.g. BorderLayout EAST).
In this blog post there is a sample for making a scrollbar but it isn't "on top". It can be used as a starting point.
I would like to build a carousel for selecting items from a list. It should give the user the possibility to scroll through the list by moving the mouse to the top area of the list (which should accelerate the scrolling) and the scrolling should stop when the mouse is in the middle.
Something close to is was the PathListBox from Microsoft. I tried to build the sample but the items are jumping from one end to the other one in a very strange way when I switch to the next item.
(source: microsoft.com)
So my question is, if there is something similar in WPF / C# to build such an item-list which can be animated prettily but without the animation bugs?
try these
http://wpfcarousel.codeplex.com/
http://www.codeproject.com/Articles/181835/WPF-Carousel-Control
Can it be prevented that, when the user is viewing the last PanoramaItem, that he can scroll further to the right? - which moves back to the the first PanoramaItem.
(and, vice-versa, preventing to scroll from the first to the last by swiping to the left)
I'm asking this because in my app I have a panorama-page with only 2 PanoramaItems. The user can scroll from one to the other by swiping to the left or to the right. I want to prevent that other animation when scrolling beyond the last PanoramaItem.
Is it possible?
Sounds to me that you perhaps you shouldn't be using the Panorama at all. Looking at your other question about making the items smaller, it seems you want to push the Panorama beyond its designed purpose.
Perhaps you need is ScrollViewer with your two items (laid out using Grids) in a StackPanel with a horizontal orientation.
This is apparently how panorama is designed to work. There isn't a parameter to disable the capability.
Breaking from this behaviour would likely confuse users by introducing inconsistent behaviour between apps.
There are visual cues to indicate to the user that they are wrapping around with their scrolling action. The Title is displayed from the begining again and if your background image supports it, the join of the right side and left side indicates that the panorarma is wrapping around.
I'm trying to achieve swipe navigation on Windows Phone 7. I would like to navigate from one page to another by swiping left or right. How can i do this?
You might want to investigate the pivot control -- this is like a tab control where left and right swipes move between pages. Some of the labs on Channel 9 cover them (here, look at Exercise 2 for a walkthrough of creating one).
Look at the GestureService and GestureListener in the Silverlight for Windows Phone Toolkit
You can have a horizontal ScrollViewer which contains a horizontal StackPanel. Then put your pages in the StackPanel. Check out http://wp7iphone.codeplex.com for an example of how to emulate the iPhone-style horizontal swipe interface with this approach.
If you want the scrollviewer to "snap" to the nearest page when the swipe stops, it can handle the ManipulationCompleted event and manually adjust its HorizontalOffset appropriately.
I am developing a form in .NET Compact Framework, which hosts a variable number of controls. Every control should have the same width as the form. When there are only a few controls, no vertical scrollbar appears. When there are more controls than they can fit in one form, a vertical scrollbar appears. The width of the controls should then be modified, so that no horizontal scrollbar appears.
What is the best way to achieve this? I am interested in a solution that will work in all platforms/screen sizes and that can support screen orientation changes.
If I get this right, at one point, both a vertical and horizontal scrollbar appear, and you want only the vertical scrollbar? Doesn't setting the Anchor of each control to "Top|Left|Right" solve this problem automatically?
If every control is to be the same width as the form, why not just Dock every control to Top (or Bottom)? It'll take care of the resizing for you then. It might not look very attractive however, so I suggest adding in some empty Panels (docked the same way) to be used as vertical spacers.
I did some quick testing, and it seems, when you add controls, the panel raises the resize event when the added control tiggers the scollbars to go visible. The annoying part is here that the resize event is triggered a couple of times during startup :(
But knowing the compact framework, this might be your best shot at handling this.
Normally on the full framework you could if the DisplayRectangle is bigger than the size of the panel, but no such thing exists on the cf.
Hope this is of some help, I'll see if I can find anything more in the morning.