Panorama scrolls back to first item when another view is updated - windows-phone-8

I have found a strange issue with my windows phone 8 application using a panorama control.
Each panorama item is created dynamically using a templateselector and view models as itemsource.
In one of the panorama items I have a Listpicker. Once it's activated the panorama control scrolls back to the first panorama item. I was able to temporary fix the problem by setting the height of the view to 1000. Unfortunately, the same issue occurs when I set a hidden loading view visible.
It seems as the problem occurs when the layout is updated?
Any ideas on what could be causing this behavior?

Related

My page scrolls whenever I zoom in my agm-map via ctrl+scrollwheel

I am working on an Angular webapplication and I want to be able to zoom in my agm-map with ctrl+scrollwheel, without scrolling the page up and down. At the same time I want to be able to scroll the page normally when not pressing ctrl, because the map covers a lot of the screen and it would be awkward to scroll past it otherwise.
At first the problem was to only get the map to scroll when ctrl was pressed. Following documentation (https://developers.google.com/maps/documentation/javascript/interaction) and comments from other developers this was achieved by setting gestureHandling to cooperative and scrollWheel to null.
Now I can scroll the page normally even when hovering over the map by scrolling without pressing ctrl and still use the scrollwheel to zoom in and out within the map when pressing ctrl. But whenever I do the later the whole page scrolls up or down a bit as well.
I tried to forego setting scrollwheel to null in the agm-map, but then the map doesn't need me to use ctrl anymore despite gestureHandling still being set to cooperative and the webpage still scrolls when zooming in the map. I tried the same setup in other views of the Webapp to see if the problem occurs consistently and it does. It also happens in both Chrome and Firefox. I tried to stop eventPropagation but I wasn't sure how to do it so it only stops when I also press ctrl.
Besides this issue everything I have set up in the map works fine (Some polygons and buttons. The bounds are set dynamically).
<div class="mapContainer mt-4">
<agm-map [scrollwheel]="null" [gestureHandling]="'cooperative'" [latitude]="mapLat" [longitude]="mapLng" [fitBounds]="mapBoundsLiteral" [mapTypeControl]="true" [mapTypeId]="'satellite'" [streetViewControl]="false" #map>
[...]
</agm-map>
</div>
I'd expect the page and map to act exactly like it does in the first demo in the documentation as I use the same attributes where they seem relevant. This means the page should scroll normally when using just the scrollwheel but shouldn't scroll when I zoom the map with ctrl+scrollwheel, but the page always scrolls.

Save scroll position of LongListSelector control in Windows Phone 8

I need to save LongListSelector position in order to restore it once I get back to the page.
First I used GetItemsInView with WP7 and it works great.
Then with WP8 it was gone and I have to use ItemRealized.
It also works fine but I have side effect which that ItemRealized gives me the item which is at the bottom of current page (it could be even not visible yet).
But what I need is to scroll to the item at the top of the page.
I could subtract manually items which are visible (by calculating item height and page height) but because the realized item could be not visible yet (that means my calculation logic will not be correct) I couldn't be sure that I chosen the right element.
Is there a way to find the first visible item in the view at LongListSelector?

ListBox control shows empty screen while moving up and down wards using Windows Phone 8?

We are developing chat application, in that chat page is having listBox. If that listbox has 100's of records the page will become blank if we scroll up and down. I heard about list box whatever items we are seeing remaining items will be clear. And I used VirtualizationMode="Standard" and "Recycling" but no use. Please help me on this issue.
After done by some research, using ItemsControl my problem got solved..

How to disable remaining panorama sections disable when we are in one panorma section

I am developing Windows Phone 8 application using Panorama. I have added 4 Panorama items. When I am in first section, we can see the immediate next section. right? At this point, I am able to click on buttons of that immediate panorama section. Now I want to disable that Panorama section. It has to be activated whenever I would be navigated to that section.
How to accomplish this task in Windows phone 8 development? Do we need to write any special code behind or can we handle it in xaml?
Appreciate your help.
Hi You can use Loaded event handler for panorama items and have all content of items disabled in all panorama items by default. Now just enable respective controls of a panorama item when its being loaded (in Loaded event handler). Also disable all controls of this panoramic item when it unload.
You need to trigger Loaded event handler for all panorama items.
Hope this help you.
Zauk

Reorder list rows in flex mobile app

How can I let the user reorder the rows of a list in a flex mobile app?
You know, you see it a lot in native iOS apps. Usually you hit an Edit button at the top of a list view. Each row then gets a thumb icon that lets you move the rows around in the list.
This might be totally obvious, but I'm writing my first mobile app in flex and can't seem to find an example anywhere.
Cheers.
Spark List control supports Drag and Drop, besides dragging and dropping with the list itself, you can also do so between two different list controls. To enable the feature, you could set dragEnabled, dragMoveEnabled, dropEnabled properties to true, more details may be found in this help document.
To enable the feature as you described, you could set those drag and drop properties to true when the edit mode is enabled. Optionally, you could also display a drag handler (as decorator).
Update: For mobile application, there is a write-up on how to get around with mobile limitation of drag-and-drop.