예제 #1
0
        private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {

            selectedphoto = e.NavigationParameter as PrismDemo.Models.Location;

            var fence = new Ellipse()
            {

                Fill = new SolidColorBrush(Colors.Blue),
                Stroke = new SolidColorBrush(Colors.White),
                StrokeThickness = 3,
                Width = 25,
                Height = 25,
               
            };

            TextBlock text = new TextBlock();
            text.FontSize = 20;
            text.Width = 200;
            text.TextWrapping = TextWrapping.Wrap;
            text.Text = selectedphoto.title;
            text.Foreground = new SolidColorBrush( Colors.Black);
            text.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
            text.TextAlignment = TextAlignment.Center;

            StackPanel stak = new StackPanel();
            stak.Children.Add(text);
            stak.Children.Add(fence);



            Bing.Maps.Location locationpos = new Bing.Maps.Location(selectedphoto.latitude, selectedphoto.longitude);
            map1.SetView(locationpos, 16);

            map1.Children.Add(stak);

            MapLayer.SetPosition(stak, locationpos);
                        
        }
예제 #2
0
 /// <summary>
 /// Populates the page with content passed during navigation. Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session. The state will be null the first time a page is visited.</param>
 private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
 }