{"id":793,"date":"2010-09-23T08:29:00","date_gmt":"2010-09-23T08:29:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2010\/09\/23\/announcing-microsoft-visual-basic-ctp-for-windows-phone-developer-tools\/"},"modified":"2024-07-05T12:40:54","modified_gmt":"2024-07-05T19:40:54","slug":"announcing-microsoft-visual-basic-ctp-for-windows-phone-developer-tools","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/announcing-microsoft-visual-basic-ctp-for-windows-phone-developer-tools\/","title":{"rendered":"Announcing Microsoft Visual Basic CTP for Windows Phone Developer Tools"},"content":{"rendered":"<p><span style=\"font-size: small;\">Today we announced availability of the <\/span><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=201859\"><span style=\"font-size: small;\">Microsoft Visual Basic CTP for Windows Phone Developer Tools<\/span><\/a><span style=\"font-size: small;\">.\u00a0 You can download the release here:<\/span><\/p>\n<ul>\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=201859\"><span style=\"font-size: small;\">http:\/\/go.microsoft.com\/fwlink\/?LinkId=201859<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-size: small;\">This CTP is to be used with the <\/span><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;displaylang=en\"><span style=\"font-size: small;\">Windows Phone Developer Tools<\/span><\/a><span style=\"font-size: small;\">, in order to do Windows Phone 7 development with Visual Basic. We have heard a lot of customer requests for this capability and are all very excited about today\u2019s announcement. Here are some Microsoft blog posts regarding this announcement:<\/span><\/p>\n<ul>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/somasegar\/archive\/2010\/09\/23\/windows-phone-vb-developers-great-mobile-apps.aspx\"><span style=\"font-size: small;\">Soma&#8217;s blog<\/span><\/a><\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/jasonz\/archive\/2010\/09\/23\/placeholder1.aspx\"><span style=\"font-size: small;\">Jason\u2019s blog<\/span><\/a><span style=\"font-size: small;\">\u00a0 <\/span><\/li>\n<li><a href=\"http:\/\/windowsteamblog.com\/windows_phone\/b\/wpdev\/archive\/2010\/09\/23\/visual-basic-comes-to-windows-phone-7.aspx\"><span style=\"font-size: small;\">Windows Team blog<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-size: small;\">Please find below a walkthrough with screenshots of the experience creating a Windows Phone 7 application with Visual Basic, using the new CTP.<\/span><\/p>\n<p><span style=\"font-size: small;\">WALKTHROUGH:<\/span><\/p>\n<p><span style=\"font-size: small;\">Open Visual Studio and create a new project by selecting the File | New Project menu command.<\/span><\/p>\n<p><span style=\"font-size: small;\">The New Project window will be displayed. Expand the Visual Basic templates, and then select the Silverlight for Windows Phone templates.<\/span><\/p>\n<p><span style=\"font-size: small;\">Select the Windows Phone Application template. Fill in the project Name as \u201cConversionCalculator\u201d.<\/span><\/p>\n<p><span style=\"font-size: small;\">Click OK. A new project will be created and MainPage.xaml will be opened in the Visual Studio designer window.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/1856.clip_image002_thumb_4FC716F5.jpg\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/1856.clip_image002_thumb_4FC716F5.jpg\" alt=\"clip_image002\" width=\"529\" height=\"368\" border=\"0\" \/><\/a><\/p>\n<p><span style=\"font-size: small;\">The next step is to lay out the controls of the application using the Visual Studio designer. Once you open a xaml file, click on toolbox, you can drag and drop any control onto your design surface. , The final layout will look similar to the following screen shot:<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/1200.clip_image004_thumb_67DA5B83.jpg\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/1200.clip_image004_thumb_67DA5B83.jpg\" alt=\"clip_image004\" width=\"529\" height=\"424\" border=\"0\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/3377.clip_image006_thumb_39047D14.jpg\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/3377.clip_image006_thumb_39047D14.jpg\" alt=\"clip_image006\" width=\"304\" height=\"555\" border=\"0\" \/><\/a><\/p>\n<p><span style=\"font-size: small;\">For anyone that who worked with Winforms, WPF, Silverlight or ASP.NET, creating a page layout is very similar. Drag and drop controls from the toolbox onto the designer surface and modify the properties of the controls either through the properties window, by modifying the .xaml code directly or by using the mouse to control size &amp; position of controls on the surface.<\/span><\/p>\n<p><span style=\"font-size: small;\">To save you the effort of having to do this and make sure all the names match, you can simply replace the contents of MainPage.xaml with the .xaml code below.<\/span><\/p>\n<p><span style=\"font-size: small;\">The page itself is quite simple and consists of Radio Buttons, Listbox , Buttons, Textboxes, and TextBlocks. All of these should be familiar to those that have done any other development using a UI using Visual Studio.<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: xx-small;\"><span style=\"font-family: consolas; color: blue; font-size: 10pt;\"><span style=\"font-family: consolas; font-size: 10pt;\"><span style=\"font-size: x-small;\"><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">phone<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: #a31515;\">PhoneApplicationPage<\/span><\/span><\/span><\/span><\/span><span style=\"font-size: x-small;\"><span style=\"font-family: consolas;\">\n<span style=\"color: red;\">x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Class<\/span><span style=\"color: blue;\">=&#8221;ConversionCalculator.MainPage&#8221;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">=&#8221;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&#8221;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">x<\/span><span style=\"color: blue;\">=&#8221;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&#8221;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">phone<\/span><span style=\"color: blue;\">=&#8221;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone&#8221;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">shell<\/span><span style=\"color: blue;\">=&#8221;clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone&#8221;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">d<\/span><span style=\"color: blue;\">=&#8221;http:\/\/schemas.microsoft.com\/expression\/blend\/2008&#8243;<\/span>\n<span style=\"color: red;\">xmlns<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">mc<\/span><span style=\"color: blue;\">=&#8221;http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006&#8243;<\/span>\n<span style=\"color: red;\">mc<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Ignorable<\/span><span style=\"color: blue;\">=&#8221;d&#8221;<\/span><span style=\"color: red;\"> d<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">DesignWidth<\/span><span style=\"color: blue;\">=&#8221;480&#8243;<\/span><span style=\"color: red;\"> d<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">DesignHeight<\/span><span style=\"color: blue;\">=&#8221;768&#8243;<\/span>\n<span style=\"color: red;\">FontFamily<\/span><span style=\"color: blue;\">=&#8221;{<\/span><span style=\"color: #a31515;\">StaticResource<\/span><span style=\"color: red;\"> PhoneFontFamilyNormal<\/span><span style=\"color: blue;\">}&#8221;<\/span>\n<span style=\"color: red;\">FontSize<\/span><span style=\"color: blue;\">=&#8221;{<\/span><span style=\"color: #a31515;\">StaticResource<\/span><span style=\"color: red;\"> PhoneFontSizeNormal<\/span><span style=\"color: blue;\">}&#8221;<\/span>\n<span style=\"color: red;\">Foreground<\/span><span style=\"color: blue;\">=&#8221;{<\/span><span style=\"color: #a31515;\">StaticResource<\/span><span style=\"color: red;\"> PhoneForegroundBrush<\/span><span style=\"color: blue;\">}&#8221;<\/span>\n<span style=\"color: red;\">SupportedOrientations<\/span><span style=\"color: blue;\">=&#8221;Portrait&#8221;<\/span><span style=\"color: red;\"> Orientation<\/span><span style=\"color: blue;\">=&#8221;Portrait&#8221;<\/span>\n<span style=\"color: red;\">shell<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">SystemTray.IsVisible<\/span><span style=\"color: blue;\">=&#8221;True&#8221;&gt;<\/span><\/p>\n<p><span style=\"color: #a31515;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: green;\">&lt;!&#8211;LayoutRoot is the root grid where all page content is placed&#8211;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: red;\"> x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Name<\/span><span style=\"color: blue;\">=&#8221;LayoutRoot&#8221;<\/span><span style=\"color: red;\"> Background<\/span><span style=\"color: blue;\">=&#8221;Transparent&#8221;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Grid.RowDefinitions<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">RowDefinition<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;Auto&#8221;\/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">RowDefinition<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;*&#8221;\/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">Grid.RowDefinitions<\/span><span style=\"color: blue;\">&gt;<\/span><\/p>\n<p><span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: green;\">&lt;!&#8211;TitlePanel contains the name of the application and page title&#8211;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">StackPanel<\/span><span style=\"color: red;\"> x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Name<\/span><span style=\"color: blue;\">=&#8221;TitlePanel&#8221;<\/span><span style=\"color: red;\"> Grid.Row<\/span><span style=\"color: blue;\">=&#8221;0&#8243;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;12,17,0,28&#8243;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Name<\/span><span style=\"color: blue;\">=&#8221;ApplicationTitle&#8221;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;Conversion Calculator&#8221;<\/span><span style=\"color: red;\"> Style<\/span><span style=\"color: blue;\">=&#8221;{<\/span><span style=\"color: #a31515;\">StaticResource<\/span><span style=\"color: red;\"> PhoneTextNormalStyle<\/span><span style=\"color: blue;\">}&#8221;\/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Name<\/span><span style=\"color: blue;\">=&#8221;PageTitle&#8221;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;Conversion&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;9,-7,0,0&#8243;<\/span><span style=\"color: red;\"> Style<\/span><span style=\"color: blue;\">=&#8221;{<\/span><span style=\"color: #a31515;\">StaticResource<\/span><span style=\"color: red;\"> PhoneTextTitle1Style<\/span><span style=\"color: blue;\">}&#8221;\/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">StackPanel<\/span><span style=\"color: blue;\">&gt;<\/span><\/p>\n<p><span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: green;\">&lt;!&#8211;ContentPanel &#8211; place additional content here&#8211;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: red;\"> x<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: red;\">Name<\/span><span style=\"color: blue;\">=&#8221;Co\nntentPanel&#8221;<\/span><span style=\"color: red;\"> Grid.Row<\/span><span style=\"color: blue;\">=&#8221;1&#8243;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;12,0,12,0&#8243;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;595&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;0,6,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;Grid1&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;468&#8243;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">StackPanel<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;140&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;15,21,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;StackPanel1&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;427&#8243;&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">RadioButton<\/span><span style=\"color: red;\"> Content<\/span><span style=\"color: blue;\">=&#8221;Length&#8221;<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;71&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;RadioButton1&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">RadioButton<\/span><span style=\"color: red;\"> Content<\/span><span style=\"color: blue;\">=&#8221;Weight&#8221;<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;71&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;RadioButton2&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">StackPanel<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;15,187,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TextBlock1&#8243;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;Conversions&#8221;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">ListBox<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;159&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;145,167,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;LstConversions&#8221;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;297&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;18,345,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TextBlock2&#8243;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;From:&#8221;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;18,404,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TextBlock3&#8243;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;To:&#8221;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;18,463,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TextBlock4&#8243;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;Factor:&#8221;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBox<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;72&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;129,322,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TxtFrom&#8221;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;0&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;327&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;145,404,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TxtTo&#8221;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;0&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span>=&#8221;297&#8243; \/&gt;\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBlock<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;30&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;145,463,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;TxtFactor&#8221;<\/span><span style=\"color: red;\"> Text<\/span><span style=\"color: blue;\">=&#8221;0&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;297&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Button<\/span><span style=\"color: red;\"> Content<\/span><span style=\"color: blue;\">=&#8221;Calc&#8221;<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;72&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;49,508,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;Button1&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;160&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">Button<\/span><span style=\"color: red;\"> Content<\/span><span style=\"color: blue;\">=&#8221;Reset&#8221;<\/span><span style=\"color: red;\"> Height<\/span><span style=\"color: blue;\">=&#8221;72&#8243;<\/span><span style=\"color: red;\"> HorizontalAlignment<\/span><span style=\"color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"color: red;\"> Margin<\/span><span style=\"color: blue;\">=&#8221;203,508,0,0&#8243;<\/span><span style=\"color: red;\"> Name<\/span><span style=\"color: blue;\">=&#8221;Button2&#8243;<\/span><span style=\"color: red;\"> VerticalAlignment<\/span><span style=\"color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"color: red;\"> Width<\/span><span style=\"color: blue;\">=&#8221;160&#8243; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">Grid<\/span><span style=\"color: blue;\">&gt;<\/span><\/p>\n<p><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">phone<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: #a31515;\">PhoneApplicationPage<\/span><span style=\"color: blue;\">&gt;<\/span><\/span> <\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">Next step: Add code to implement the application logic. <\/span><\/p>\n<p><span style=\"font-size: small;\">We now have a user interface for our phone application but it doesn\u2019t do anything. So we need to add some code to the application to make the converter work. Adding code is similar to the current experience with Silverlight or WPF. You can add code in code behind xaml.vb, or you can add code file into existing project.<\/span><\/p>\n<p><span style=\"font-size: small;\">The general editing experience is similar to Winform, Silverlight and WPF application development. IntelliSense , colorization, and code spit work the same. New VS2010 IDE features such Generate From Usage and Navigate To also work well with phone app. Double click the Reset button, and a default event handler will be generated. You should see something similar to the following \u2026 <\/span><\/p>\n<pre><span style=\"font-family: consolas; color: blue;\"><span style=\"font-size: small;\">Partial<\/span><\/span><span style=\"font-family: consolas;\"><span style=\"font-size: small;\">\u00a0<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Class<\/span>\u00a0<span style=\"color: #2b91af;\">MainPage<\/span>\r\n\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue;\">Inherits<\/span>\u00a0<span style=\"color: #2b91af;\">PhoneApplicationPage<\/span>\r\n\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span>\u00a0<span style=\"color: blue;\">New<\/span>()\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 InitializeComponent()\r\n\r\n\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span>\r\n\u00a0\r\n\u00a0\u00a0\u00a0\u00a0 <span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> button1_Click(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">Object<\/span>, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: #2b91af;\">RoutedEventArgs<\/span>)\r\n<\/span><\/span><\/pre>\n<pre><span style=\"font-family: consolas;\"><span style=\"font-size: small;\">\u00a0\u00a0\u00a0 <span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span>\r\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Class<\/span>&lt;?xml:namespace prefix = o \/&gt;<\/span><\/span><\/pre>\n<p><span style=\"font-size: small;\">In this method we simply reset the textboxes back to a default value. This should be as straightforward as setting the appropriate textbox .text properties.<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: consolas; color: blue; font-size: 10pt;\"><span style=\"font-size: small;\">Private<\/span><\/span><span style=\"font-family: consolas; font-size: 10pt;\"><span style=\"font-size: xx-small;\"><span style=\"font-size: small;\">\u00a0<span style=\"color: blue;\">Sub<\/span> Button2_Click(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span> System.<span style=\"color: #2b91af;\">Object<\/span>, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span> System.Windows.<span style=\"color: #2b91af;\">RoutedEventArgs<\/span>) <span style=\"color: blue;\">Handles<\/span> Button2.Click\nTxtFrom.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\nTxtTo.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\nTxtFactor.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<\/span><span style=\"color: blue;\"><span style=\"font-size: small;\">Sub <\/span><\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small;\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">IntelliSense works and will provide you with options for Controls, properties etc. This helps identify any new properties you may not be familiar with.<\/span><\/p>\n<p><span style=\"font-size: small;\">To add a little spice to the app, we are going to add another class into the project and use this store the various conversions factors.<\/span><\/p>\n<p><span style=\"font-size: small;\">We can simply add a new code file to the project using Project -&gt; Add Class\u2026 and then add a class called \u201cConversions.vb\u201d. The code is pretty straightforward and will simply define some auto implemented properties and an override for the .ToString method.<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: consolas; color: blue; font-size: 10pt;\"><span style=\"font-size: small;\">Public<\/span><\/span><span style=\"font-family: consolas; font-size: 10pt;\"><span style=\"font-size: xx-small;\"><span style=\"font-size: small;\">\u00a0<span style=\"color: blue;\">Class<\/span>\u00a0<span style=\"color: #2b91af;\">Conversions<\/span>\n<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Property<\/span> FromUnit <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">String<\/span> = <span style=\"color: #a31515;\">&#8220;&#8221;<\/span>\n<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Property<\/span> ToUnit <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">String<\/span> = <span style=\"color: #a31515;\">&#8220;&#8221;<\/span>\n<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Property<\/span> ConversionFactor <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">Double<\/span> = 0<\/p>\n<p><span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Overrides<\/span>\u00a0<span style=\"color: blue;\">Function<\/span> ToString() <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">String<\/span>\n<span style=\"color: blue;\">Return<\/span> FromUnit &amp; <span style=\"color: #a31515;\">&#8221; =&gt; &#8220;<\/span> &amp; ToUnit\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Function<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Class<\/span> <\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small;\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">Next we\u2019re going to retrieve the conversion factors from an XML Literal using a XML LINQ query. To do this, we need to add a reference to System.Xml.Linq. Once added, you should see it appear in the application references list.<\/span><\/p>\n<p><b><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/0284.clip_image008_thumb_39BC9764.jpg\"><span style=\"font-size: small;\"><img decoding=\"async\" style=\"border: 0px;\" title=\"clip_image008\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/0284.clip_image008_thumb_39BC9764.jpg\" alt=\"clip_image008\" width=\"304\" height=\"411\" border=\"0\" \/><\/span><\/a><\/b><b><\/b><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">Now we can add the final code to set up the XML literal with the conversions and implement the filtering using the radio buttons and a LINQ query over the XML.<\/span><\/p>\n<p><span style=\"font-size: small;\">For this, we are going to add a few VB methods. We\u2019ll see how new features in VS2008 and VS2010 can help us achieve this easily.<\/span><\/p>\n<p><span style=\"font-size: small;\">Again, you can simply copy the entire code behind file below. and replace the contents. (If you copied the .xaml file earlier, then copying this VB code file will ensure that the control names match between the two files.)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: consolas; color: blue; font-size: 10pt;\"><span style=\"font-size: small;\">Partial<\/span><\/span><span style=\"font-family: consolas; font-size: 10pt;\"><span style=\"font-size: xx-small;\"><span style=\"font-size: small;\">\u00a0<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Class<\/span>\u00a0<span style=\"color: #2b91af;\">MainPage<\/span>\n<span style=\"color: blue;\">Inherits<\/span> PhoneApplicationPage<\/p>\n<p><span style=\"color: green;\">&#8216; Constructor<\/span>\n<span style=\"color: blue;\">Public<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span>\u00a0<span style=\"color: blue;\">New<\/span>()\nInitializeComponent()\nPopulateAllConversions()\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> Button2_Click(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span> System.Object, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span> System.Windows.RoutedEventArgs) <span style=\"color: blue;\">Handles<\/span> Button2.Click\nTxtFrom.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\nTxtTo.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\nTxtFactor.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span> AllConversions <span style=\"color: blue;\">As<\/span> System.Xml.Linq.XElement<\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> PopulateAllConversions()\nAllConversions = <span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversions<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Length<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">meters<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">centimeter<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 100<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Length<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">centimeter<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">meter<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.01<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Length<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">inch<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">centimeter<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.5<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Length<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">centimeter<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">inche<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0&amp;nb\nsp;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.4<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Weight<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">lbs<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Kg<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.2 <\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;<\/span><span style=\"color: #844646;\">Conversion<\/span>\u00a0<span style=\"color: #b96464;\">Type<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Weight<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">From<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">Kg<\/span><span style=\"color: #555555;\">&#8220;<\/span>\u00a0<span style=\"color: #b96464;\">To<\/span><span style=\"color: #6464b9;\">=<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">lb<\/span><span style=\"color: #555555;\">&#8220;<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.453 <\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversion<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: #555555;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #6464b9;\">&lt;\/<\/span><span style=\"color: #844646;\">Conversions<\/span><span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> RetrieveConversions(<span style=\"color: blue;\">ByVal<\/span> Type <span style=\"color: blue;\">As<\/span>\u00a0<span style=\"color: blue;\">String<\/span>)\n<span style=\"color: blue;\">If<\/span> AllConversions <span style=\"color: blue;\">IsNot<\/span>\u00a0<span style=\"color: blue;\">Nothing<\/span>\u00a0<span style=\"color: blue;\">Then<\/span>\n<span style=\"color: green;\">&#8216;Query the XML Based upon Type argument<\/span>\n<span style=\"color: blue;\">Dim<\/span> QueryItems = <span style=\"color: blue;\">From<\/span> item <span style=\"color: blue;\">In<\/span> AllConversions<span style=\"color: #6464b9;\">&#8230;&lt;<\/span>Conversion<span style=\"color: #6464b9;\">&gt;<\/span>\n<span style=\"color: blue;\">Where<\/span> item<span style=\"color: #6464b9;\">.@<\/span>Type = Type\n<span style=\"color: blue;\">Select<\/span> item<\/p>\n<p><span style=\"color: green;\">&#8216;Populate the Listbox<\/span>\nLstConversions.Items.Clear()\n<span style=\"color: blue;\">For<\/span>\u00a0<span style=\"color: blue;\">Each<\/span> i <span style=\"color: blue;\">In<\/span> QueryItems\nLstConversions.Items.Add(<span style=\"color: blue;\">New<\/span> Conversions <span style=\"color: blue;\">With<\/span> {.FromUnit = i<span style=\"color: #6464b9;\">.@<\/span>From, .ToUnit = i<span style=\"color: #6464b9;\">.@<\/span>To, .ConversionFactor = i.Value})<\/p>\n<p><span style=\"color: blue;\">Next<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">If<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> RadioButton1_Checked(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span> System.Object, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span> System.Windows.RoutedEventArgs) <span style=\"color: blue;\">Handles<\/span> RadioButton1.Checked, RadioButton2.Checked\n<span style=\"color: green;\">&#8216;Filter Listbox depending on radio button checked<\/span>\n<span style=\"color: blue;\">If<\/span> sender <span style=\"color: blue;\">Is<\/span> RadioButton1 <span style=\"color: blue;\">Then<\/span>\nRetrieveConversions(<span style=\"color: #a31515;\">&#8220;Length&#8221;<\/span>)\n<span style=\"color: blue;\">ElseIf<\/span> sender <span style=\"color: blue;\">Is<\/span> RadioButton2 <span style=\"color: blue;\">Then<\/span>\nRetrieveConversions(<span style=\"color: #a31515;\">&#8220;Weight&#8221;<\/span>)\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">If<\/span>\nEnd\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> LstConversions_SelectionChanged(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span> System.Object, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span> System.Windows.Controls.SelectionChangedEventArgs) <span style=\"color: blue;\">Handles<\/span> LstConversions.SelectionChanged\n<span style=\"color: blue;\">If<\/span> sender <span style=\"color: blue;\">Is<\/span> LstConversions <span style=\"color: blue;\">Then<\/span>\n<span style=\"color: blue;\">If<\/span> LstConversions.SelectedItem <span style=\"color: blue;\">IsNot<\/span>\u00a0<span style=\"color: blue;\">Nothing<\/span>\u00a0<span style=\"color: blue;\">Then<\/span>\nTxtFactor.Text = <span style=\"color: blue;\">CType<\/span>(LstConversions.SelectedItem, Conversions).ConversionFactor.ToString\n<span style=\"color: blue;\">Else<\/span>\nTxtFactor.Text = <span style=\"color: #a31515;\">&#8220;0&#8221;<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">If<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">If<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span><\/p>\n<p><span style=\"color: blue;\">Private<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span> Button1_Click(<span style=\"color: blue;\">ByVal<\/span> sender <span style=\"color: blue;\">As<\/span> System.Object, <span style=\"color: blue;\">ByVal<\/span> e <span style=\"color: blue;\">As<\/span> System.Windows.RoutedEventArgs) <span style=\"color: blue;\">Handles<\/span> Button1.Click\n<span style=\"color: blue;\">Try<\/span>\n<span style=\"color: blue;\">Dim<\/span> calcvalue = <span style=\"color: blue;\">CDbl<\/span>(TxtFrom.Text) * <span style=\"color: blue;\">CDbl<\/span>(TxtFactor.Text)\nTxtTo.Text = calcvalue.ToString\n<span style=\"color: blue;\">Catch<\/span> ex <span style=\"color: blue;\">As<\/span> Exception\nTxtTo.Text = <span style=\"color: #a31515;\">&#8220;Invalid&#8221;<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Try<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Sub<\/span>\n<span style=\"color: blue;\">End<\/span>\u00a0<span style=\"color: blue;\">Class<\/span> <\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small;\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">The code above declares methods with event handlers for the following events<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 RadioButton1.Click<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 RadioButton2.Click<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 LstConversion.SelectionChanged<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 Button1.Click<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 Button2.Click<\/span><\/p>\n<p><a name=\"CodeSpippet0\"><\/a><a name=\"CodeSpippet1\"><\/a><a name=\"CodeSpippet3\"><\/a><\/p>\n<p><span style=\"font-size: small;\">At this point we should be able to build the application and test it.<\/span><\/p>\n<p><span style=\"font-size: small;\">We can build the solution using Debug | Build Solution menu command. The project should build without any errors in the Error List window. You can open the Error List window, if it is not already open, by selecting the View | Other Windows | Error List menu command. If there are errors, review the steps above, correct any errors, and then build the solution again.<\/span><\/p>\n<p><span style=\"font-size: small;\">Even if we don\u2019t have windows phone, we do have a Windows Phone Emulator which allows us to debug and test the app more easily by selecting the Debug | Start Debugging menu command. In the toolbar you can see both options.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/2275.clip_image010_thumb_474F07D2.jpg\"><span style=\"font-size: small;\"><img decoding=\"async\" style=\"border: 0px;\" title=\"clip_image010\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/2275.clip_image010_thumb_474F07D2.jpg\" alt=\"clip_image010\" width=\"390\" height=\"87\" border=\"0\" \/><\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">This will open the emulator window and launch the application.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/6740.clip_image012_thumb_3CBE0DE5.jpg\"><span style=\"font-size: small;\"><img decoding=\"async\" style=\"border: 0px;\" title=\"clip_image012\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2010\/09\/6740.clip_image012_thumb_3CBE0DE5.jpg\" alt=\"clip_image012\" width=\"304\" height=\"567\" border=\"0\" \/><\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">Now let\u2019s run our first converter app on emulator! Select a Radio Button and ensure the conversion listbox is populated. Select a conversion and ensure the Factor is populated. Then enter a value and click the calc button to ensure the Result is calculated.<\/span><\/p>\n<p><span style=\"font-size: small;\">While debugging, you may want to debug specific sections of code. No problem! Set debug breakpoints in the code by placing the cursor on the desired line of code and selecting the Debug | Toggle Breakpoint menu command. Basically, you can debug windows phone app in the same way that you debug other projects. <\/span><\/p>\n<p><span style=\"font-size: small;\">After the breakpoint is hit, you can step line by line, watch variables in the watch windows, and use other usual Visual Studio debugging techniques, in order to to determine your application behavior.<\/span><\/p>\n<p><span style=\"font-size: small;\">You can then stop debugging when you have done enough testing.<\/span><\/p>\n<p><span style=\"font-size: small;\">After debugging the application, you may realize that entering the \u201cFrom\u201d units with the virtual keyword involved having to change to the digits view every time. We would prefer that this showed the numeric values by default. This can be easily achieved with a slight modification of the .xaml file and replacing the following line:<\/span><\/p>\n<p><span style=\"font-size: small;\"><span style=\"line-height: 115%; font-family: consolas; color: blue;\">&lt;<\/span><span style=\"line-height: 115%; font-family: consolas; color: #a31515;\">TextBox<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> Height<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;72&#8243;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> HorizontalAlignment<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> Margin<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;129,322,0,0&#8243;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> Name<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;TxtFrom&#8221;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> Text<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;0&#8243;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> VerticalAlignment<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"line-height: 115%; font-family: consolas; color: red;\"> Width<\/span><span style=\"line-height: 115%; font-family: consolas; color: blue;\">=&#8221;327&#8243; \/&gt;<\/span> <\/span><\/p>\n<p><span style=\"font-size: small;\">In place of the line above, paste in the following code which includes a textbox InputScope<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: small;\"><span style=\"font-family: consolas; color: blue;\">&lt;<\/span><span style=\"font-family: consolas; color: #a31515;\">TextBox<\/span><span style=\"font-family: consolas; color: red;\"> Height<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;72&#8243;<\/span><span style=\"font-family: consolas; color: red;\"> HorizontalAlignment<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;Left&#8221;<\/span><span style=\"font-family: consolas; color: red;\"> Margin<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;129,322,0,0&#8243;<\/span><span style=\"font-family: consolas; color: red;\"> Name<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;TxtFrom&#8221;<\/span><span style=\"font-family: consolas; color: red;\"> Text<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;0&#8243;<\/span><span style=\"font-family: consolas; color: red;\"> VerticalAlignment<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;Top&#8221;<\/span><span style=\"font-family: consolas; color: red;\"> Width<\/span><span style=\"font-family: consolas; color: blue;\">=&#8221;327&#8243;&gt;<\/span><\/span><span style=\"font-family: consolas; font-size: 8pt;\"><span style=\"font-size: small;\">\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">TextBox.InputScope<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">InputScope<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: #a31515;\">InputScopeName<\/span><span style=\"color: red;\"> NameValue<\/span><span style=\"color: blue;\">=&#8221;Digits&#8221; \/&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">InputScope<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: #a31515;\">\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">TextBox.InputScope<\/span><span style=\"color: blue;\">&gt;<\/span>\n<span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: #a31515;\">TextBox<\/span><span style=\"color: blue;\">&gt;<\/span><span style=\"color: #a31515;\">\u00a0<\/span> <\/span><\/span><\/p>\n<p><span style=\"font-size: small;\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: small;\">You can thethen step into the application again and start debugging, to see these new settings.<\/span><\/p>\n<p><span style=\"font-size: small;\">Each time you debug, you do not need to close the emulator. In fact this results in additional time starting the emulator. Instead, leave it running even when you stop debugging. This way when you do you start your next debugging session, it simply deploys the updated application to the emulator and the resulting startup is significantly quicker.<\/span><\/p>\n<p><span style=\"font-size: small;\">Congratulations! Now your first Windows Phone 7 Silverlight application in VB is up running! Fortunately, we were able to enjoy the same editing and debugging experience as in other applications.<\/span><\/p>\n<p><span style=\"font-size: small;\">As you can see, this is a comprehensive Visual Basic CTP for Windows Phone development. <\/span><\/p>\n<p><span style=\"font-size: small;\">Here are some additional useful links, for further information and discussion:\u00a0 <\/span><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"http:\/\/windowsteamblog.com\/windows_phone\/b\/wpdev\/\"><span style=\"font-size: small;\">Windows Phone Developer Blog<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/category\/windowsphone\"><span style=\"font-size: small;\">Windows Phone Forums<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"https:\/\/connect.microsoft.com\/VisualStudio\/\"><span style=\"font-size: small;\">Microsoft Connect<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"http:\/\/msdn.microsoft.com\/vbasic\/default.aspx\"><span style=\"font-size: small;\">Visual Basic Developer Center<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"https:\/\/channel9.msdn.com\/blogs\/egibson\/windows-phone-7-jump-start-session-1-of-12-introduction\"><span style=\"font-size: small;\">Windows Phone 7 Jump Start<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">\u00b7 <\/span><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?displaylang=en&amp;FamilyID=ca23285f-bab8-47fa-b364-11553e076a9a\"><span style=\"font-size: small;\">Windows Phone 7 Training Kit for Developers<\/span><\/a><\/p>\n<p><span style=\"font-size: small;\">Enjoy the CTP and thank you in advance for your feedback!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we announced availability of the Microsoft Visual Basic CTP for Windows Phone Developer Tools.\u00a0 You can download the release here: http:\/\/go.microsoft.com\/fwlink\/?LinkId=201859 This CTP is to be used with the Windows Phone Developer Tools, in order to do Windows Phone 7 development with Visual Basic. We have heard a lot of customer requests for this [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[195],"tags":[144,167,180],"class_list":["post-793","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-basic","tag-spotty-bowles","tag-vb2010","tag-windows-phone"],"acf":[],"blog_post_summary":"<p>Today we announced availability of the Microsoft Visual Basic CTP for Windows Phone Developer Tools.\u00a0 You can download the release here: http:\/\/go.microsoft.com\/fwlink\/?LinkId=201859 This CTP is to be used with the Windows Phone Developer Tools, in order to do Windows Phone 7 development with Visual Basic. We have heard a lot of customer requests for this [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}