Integration of Bing Maps in Metro Style Apps with XAML


Previously we have integrated Bing Maps API with Windows Phone Controls , Silverlight WebView in SharePoint 2010 running on Windows Azure. Now, integration of Bing Maps in Windows 8 Metro Style Apps with XAML is also quite easy. You need to insert WebView controls inside the XAML code. To implement this , simply create a new Metro Style apps in VS 11 in XAML C#/VB.

  • Now drag a WebView Control from Toolbox & insert proper height & width values in it on MainPage.xaml.

  • Now add the following code in MainPage.xaml.cs:

public MainPage()

{

InitializeComponent();

Uri uri = newUri(http://www.bing.com/maps”);

WebView1.Navigate(uri);

}

MainPage.xaml:

<Grid x:Name=”LayoutRoot” Background=”#FF0C0C0C”>

<WebView x:Name=”WebView1″ HorizontalAlignment=”Left” Height=”768″ Margin=”8,8,0,-8″ VerticalAlignment=”Top” Width=”1350″ ToolTipService.ToolTip=”Maps for India”/>

</Grid>

  • Now check the preview in Simulator & local Machine mode:

  • Switch to Aerial Mode :

Advertisements

About Anindita
Anindita Basak is working as Big Data Cloud Consultant in Microsoft. Worked in multiple MNCs as Developer & Senior Developer on Microsoft Azure, Data Platform, IoT & BI , Data Visualization, Data warehousing & ETL & of course in Hadoop platform.She played both as FTE & v- employee in Azure platform teams of Microsoft.Passionate about .NET , Java, Python & Data Science. She is also an active Big Data & Cloud Trainer & would love share her experience in IT Training Industry. She is an author, forum contributor, blogger & technical reviewer of various books on Big Data Hadoop, HDInsight, IoT & Data Science, SQL Server PDW & PowerBI.

2 Responses to Integration of Bing Maps in Metro Style Apps with XAML

  1. Pingback: maps 5:30 | Chantler 411

  2. Pingback: URL

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: