Bing maps pushpins hide when we navigate back from another view - windows-8

I have created a map view using Bing map in my winrt application.When i navigate back from another view and click on pushpin for display an expanded pushpin. For this i add a UserControl to as a child of Map, that time all another pushpins are disappear.What is the reason? Please give me a solution

I suspect somewhere in your code you are clearing the children of the map and that's why they are disappearing. Adding a custom UserControl to the map works fine and I do it all the time ad have only come across your issue when I accidentally had code that cleared the children of the map. Note that is a dedicated Bing Maps forum for the Windows 8 controls where you will get answered a lot faster in the future here: http://social.msdn.microsoft.com/Forums/en-US/home?forum=bingmapswindows8

Related

Pass TappedEvent to a sibling controll in uwp

I have a user control with a bunch of buttons behind a scroll viewer that has a grid with a bunch of rows in it. The first row is empty. The buttons in user control need to respond to tap/click when not obscured by scroll viewer's content. My problem is that the scroll viewer caches the tap event and it is not passed to the user control because it is a sibling to the scroll viewer. I would like to somehow pass/propagate the tap event to the user control to get the buttons working. I can't find a good solution to this issue because there seems to be no RaiseEvent(e) method on UI elements in uwp. Due to specific requirements, the whole page needs to react to scroll and the buttons are required to be behind the scroll viewer content. Does anyone know if it is possible to pass the whole event to another element or somehow allow for both controls to handle it? Thanks in advance.

.Net Form Layout - create Chat UI like facebook or google hangouts

I want to create an application and chatting is involved. I am currently struggling to format existing controls or to create a control with the following conditions:
a container is docked to the main form's bottom
inside of that container, a button can be used to toggle a chat
component (e.g. text edit) to become either visible or invisible
if visible, the chat component is aligned with the button that was
pressed but does not force a resize on the container of the button
So basically I want to achieve a facebook or google hangouts like chat layout in vb.net that can also scale dynamically according to the current window size. Nevertheless it should always stick to the bottom.
Please keep in mind that this question is not about making the chat work but only the layout/design problem I am facing.
My current approach is the following:
FlowLayoutPanel docked to bottom with buttons
RichEdit as placeholders to simulate the chat component
My current layout
Is there an easier way to do what I want to do?
Set the anchors to the bottom of the page/panel.
On the designer, click the control you want to edit, find the Anchor property and change it to bottom (and left/right/top, whatever you'd like).

disabling Windows phone map control

My quesiton is: i have a windows phone 8 app - it has a Map Control on a page that shows the user's position.
We want to allow the user to disable the map control so it looks greyed out and disbaled and doesnt update (to save bandwith etc)
What would be the best way of doing this?
I would simply draw a control with semitransparent background on top of the map. thus all touch events would be stuck in the control, but the map would be visible under it still.

map inside a panorama or pivot not an option. but then, how?

I need to implement a page where I display items related to locations.
The user should be able to switch between viewing locations in a list and viewing the locations in the map control (as pointpoints).
A similar idea to this picture from iOS:
I wanted this in a panorama but it won't work if the map is interactive.
So this forces me to have a search button somewhere which will open this page.
But it's not what I would like to do.
I want to show users nearby items easily, without the need for them to navigate to a separate page.
I tried to look for existing apps, the built-in app, Local Scout puts the map at the top above the panorama. But I cannot do this in my case.
What's the recommended way of implementing switching between a List and Map views similar to what I described above, in a panorama?
The only idea I have is that when user chooses the see issues on the map open a separate page with the map. Switching back, I need to navigate back to the panorama and make sure it is scrolled to the panorama item (something which as far as I seen is not easily done).
If you are only going to have two items in your Panorama, I would actually suggest a Pivot page. This would fall more in line with the design standards of Windows Phone.
You could place the map on the panorama but have a transparent button over it. This would allow users to see what is actually on the map and when clicked, open to a new page that is now interactive. This could be a nice way to implement it.
Something like this, perhaps?
<Button VerticalAlignment="Top" Click="Map_Click" Height="560" BorderThickness="0">
<Grid>
<maps:Map IsEnabled="False" LandmarksEnabled="True" Name="MapControlEvent" ZoomLevel="15" Width="427" Height="877">
</maps:Map>
</Grid>
First up, I wouldn't use a Panorama or Pivot on this example, but switch visibility when pressing the button of the Map and the List. In other words, only have one page with both on them.
But if you do want to use something else... I would also suggest the Pivot control and take a look at the new Windows Phone Toolkit for Windows Phone 8!
Example here...
Because you want to use the LockablePivot when the map is displayed, otherwise the user will not understand the difference between the swipe interaction on the map and the switching swipe to the other pivot item.

Navigating to a specific section of a page in windows 8 Javascript App

I am developing a windows 8 app using JavaScript & HTML.
I have a page which has different sections laid horizontally. I have links for these sections in another page. I want the page to load from that specific section (meaning page should start from this section).
I am using a grid template and have a listview in the main page. When i click on any item in a group ,navigate to that page and come back to the main page. I want the main screen to load from the section that i have selected before.The screen should automatically scroll to that section like how it is happening from semantic zoom.
Any help in this regard will be of great use.
Thanks
For the first part, it should be enough to set the scrollLeft property of the container to the offsetLeft property of the element you want to scroll to.
The second part can be achieved by storing the scrollPosition attribute of the ListView before navigating away and setting it to its old value after navigating back.
As Ma_li said, scroll-left is one solution -- especially for non ListView content. The key here is how much of the experience you want to maintain when navigating back. One option (again, for non-listview content) is to find the element you want to be onscreen, and calling scrollIntoView on the element. However, this only brings the item on screen -- it won't bring it all the way to the left (or right, for BIDI languages), it scrolls just enough to et the whole element on screen.
For ListViews, you should use the indexOfFirstVisibleItem (or, indexOfLastVisibleItem) to scroll the listview to the correct location. This is key, because the listview is a virtualized control, this provides the most accurate & reliable method for scrolling the listview position.
Thanks Dominic & ma_il
I tried document.getElementBy("Id").focus() for the 1st Question and it worked. But i am getting a problem in this.
I have four divs Horizontally say "divA divB divC divD"
Data for the divA is coming from cloud. When i click on the link for divD in the main screen. it is not taking me to the corresponding section for the first time as it takes some time to load the divA. when click on the link for divD second time, it takes to the respective section. It is working if i use setInterval() but the DivA is shown for few seconds when the page loads and then scrolls to divD which is not good.