{"id":6183,"date":"2007-05-01T16:32:00","date_gmt":"2007-05-01T16:32:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2007\/05\/01\/vb-on-silverlight\/"},"modified":"2024-07-05T14:47:15","modified_gmt":"2024-07-05T21:47:15","slug":"vb-on-silverlight","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/vb-on-silverlight\/","title":{"rendered":"VB On Silverlight"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>One of the great things about being on the VB team is that we\u2019re generally in the loop early and often with teams developing new technologies and products. It\u2019s always exciting to see ideas take shape, evolve into a product, and eventually hit the market\u2014often after four or five code names, a couple of tech previews, and a few release date\/year extensions. Despite my best efforts, the sheer volume of new stuff coming out is a bit overwhelming; and maintaining more than a cursory understanding of the products that are incubating at Microsoft is pretty challenging. But when some partner teams started asking what it would take to write VB.NET code-behind for a browser plug-in that could run cross-browse <b><i>and<\/i> <\/b>cross-platform, my interest was definitely piqued. \u201cLet me get this straight\u2026 You want to write a web plug-in VB.NET\u2026 that doesn\u2019t require the full .NET framework to be installed\u2026 and runs on the Mac\u2026 and Firefox \u2026 but supports the full VB.NET language? Uh\u2026 Okay, let\u2019s chat.\u201d<\/p>\n<p>It has only been a few months and a handful codename changes since we had that discussion (For a humorous history of Silverlight\u2019s codenames, check out <a href=\"http:\/\/blogs.msdn.com\/tims\/archive\/2007\/04\/18\/how-did-we-come-up-with-silverlight.aspx\">Tim Sneath\u2019s blog<\/a>.) , and despite a number of obstacles, we\u2019re getting there with the Alpha release of Silverlight v 1.1. And while I\u2019m by no means a Silverlight guru, I have been using it for a little while now and I thought I\u2019d shed some light on what\u2019s out there for VB developers who are interested in trying out Silverlight v1.1.<\/p>\n<h2>\n<h2><font face=\"Calibri\" color=\"#17365d\" size=\"5\">The Visual Basic Language on Silverlight<\/font><\/h2>\n<\/h2>\n<p>Prior to the <a href=\"http:\/\/metahost.origindigital.com\/microsoft\/20070430\/mix07_20070430_500.asx\">announcement of Silverlight 1.1<\/a>, Silverlight plug-ins were written in XAML and Javascript. While the Javascript model is certainly powerful, using VB is always my preference\u2014it\u2019s a language I know well, and its flexibility suits my programming style. Not to mention that the introduction of VB.NET into the Silverlight world brings with it many of the .NET Framework\u2019s types and APIs I\u2019ve come to rely on.<\/p>\n<p>If you\u2019ve had a chance to <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=88986&amp;clcid=0x409\">download the Silverlight 1.1 runtime<\/a>, you may have noticed that it\u2019s MUCH smaller than the full .NET Framework at 4.2 MB (and hopefully shrinking!). Clearly, some things have been factored out of the .NET Framework to keep the download size down and installation time short. And although a lot has been removed, the core set of types is included along with some APIs that are particularly useful for writing plug-ins\u2014things like a \u201clite\u201d version of System.Xml.dll, support for making web service calls, and so on. When deciding what aspects of the Visual Basic language and runtime should be included with Silverlight v1.1, we tried to follow a similar pattern: we wanted to preserve the core VB programming experience\u2014late binding, conversions, Linq, and so on; and we didn\u2019t want to bloat the download size with anything that wasn\u2019t absolutely necessary or didn\u2019t make sense in Silverlight\u2014things like some of the COM helpers (COM is not supported in Silverlight), financial functions, etc. It was a delicate balance to strike between functionality and overall size. The Silverlight 1.1 Alpha is our first crack at it\u2026 and it may be refined over the coming months with feedback. Here\u2019s a laundry list of what\u2019s supported\/not supported currently. (If you\u2019re interested in digging into the details, you can also view the types in the Object Browser using the tools described below.)<\/p>\n<h4><b><i>Supported\u2026<\/i><\/b> <\/h4>\n<ul>\n<li><b>Late Binding<\/b>: One of the most definitive features of the VB language, I find late binding to be especially useful in writing Silverlight code-behind.\n<li><b>Conversions<\/b>: Implicit and explicit conversion operators are available\u2014Ctype, CStr, etc.\n<li><b>Linq<\/b>: Currently, Linq over objects is supported\n<li><b>String utilities<\/b>: Len(), InStr(), Mid(), UCase(), etc\n<li><b>VB Collection<\/b>: Most folks either love it or hate it. A subset of generic collections is also supported.&nbsp; (Non-generic collections are considered obsolete for Silverlight.)\n<ul>\n<li><b>Dictionary(Of Key, Value)<\/b>\n<li><b>List(Of T)<\/b>\n<li><b>ArrayList (Obsolete)<\/b>\n<li><b>BitArray (Obsolete)<\/b>\n<li><b>Hashtable (Obsolete)<\/b>\n<li><b>Queue (Obsolete)<\/b>\n<li><b>SortedList (Obsolete)<\/b>\n<li><b>Stack (Obsolete)<\/b><\/li>\n<\/ul>\n<li><b>Math utilities<\/b>: Rnd(), Random()\n<li><b>IIF()<\/b>\n<li><b>Information utilities<\/b>: Things like IsNumeric(), IsDate(), UBound(), LBound(), and so on\n<li><b>Date utilities: <\/b>Now(), TimeOfDay(), Year(), etc\n<li><b>Constants:<\/b> vbCrLf, vbTab, etc. Some of the more obscure constants have been removed, but the core set is included.\n<li><b>All core VB&nbsp;Language Constructs: <\/b>Type Inference, anonymous delegates, Handles, etc<b><\/b><\/li>\n<\/ul>\n<h4><b><i>Not Currently Supported\u2026<\/i><\/b> <\/h4>\n<ul>\n<li><b>The My Namespace:<\/b> We removed this for Alpha release because much of the existing My Namespace doesn\u2019t make a ton of sense in Silverlight. <b><\/b>\n<li><b>XML Literals: <\/b>The compiler support for XML literals is present, but System.Xml.Linq (which the feature depends on) is not available in Silverlight 1.1. <b><\/b>\n<li><b>COM Support: <\/b>Silverlight plug-ins are not allowed to call COM components, so we removed the VB utilities related to COM (e.g., the COM Class attribute)<b><\/b>\n<li><b>FileSystem Object (VB6 Compatibility): <\/b>Direct access to the file system is not permitted, so these APIs were removed. Alternatively, you might check out System.IO.IsolatedStorage if you need to persist data locally<b><\/b><\/li>\n<\/ul>\n<p>As a sort of test piece, I recently took a look at the <a href=\"http:\/\/silverlight.net\/samples\/1.1\/clock-vb\/run\/default.html\">Clock Sample<\/a> and wanted to see if the feature set we settled on enabled me to write VB code as I normally would for a Windows Forms or WPF application. The code basically just sets the minute, second, and hour hands on the clock to the current time (approximately). Here\u2019s what it looks like\u2026<\/p>\n<blockquote>\n<p class=\"MsoNormal\"><span>&#8216; Anonymous delegates, Handles&#8211;isn&#8217;t it pretty?<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span><span>Public<\/span><span> <span>Sub<\/span> Canvas_Loaded() <span>Handles<\/span> <span>Me<\/span>.Loaded<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>InitializeComponent()<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>&#8216; Type inference; DateTime functions<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>Dim<\/span> currentTime = Now<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>&#8216; Conversions, type inference<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>Dim<\/span> hourAngle = ((currentTime.Hour \/ 12) * 360 + currentTime.Minute \/ 2) + 180<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>Dim<\/span> minAngle = ((currentTime.Minute \/ 60) * 360) + 180<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>Dim<\/span> secAngle = ((currentTime.Second \/ 60) * 360) + 180<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>&#8216; hourAnimation is a generated variable that makes use of WithEvents and Conversions<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>&#8216;<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Protected WithEvents hourAnimation As DoubleAnimation<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>&#8216;<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Me.hourAnimation = CType(Me.FindName(&#8220;hourAnimation&#8221;),DoubleAnimation)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>hourAnimation.From = hourAngle<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>hourAnimation.To = hourAngle + 360<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>minuteAnimation.From = minAngle<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>minuteAnimation.To = minAngle + 360<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>secondAnimation.From = secAngle<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span>secondAnimation.To = secAngle + 360<\/span><\/p>\n<p class=\"MsoNormal\"><span>End<\/span><span> <span>Sub<\/span><\/span><\/p>\n<\/blockquote>\n<p>All in all, this particular example looks and feels pretty VB to me\u2014which isn\u2019t to say we\u2019ve nailed it by any means\u2026 but the example does give some indication as to the type of VB experience we\u2019re striving for with Silverlight. Let us know what you think.<\/p>\n<h2>\n<h2><font face=\"Calibri\" color=\"#17365d\" size=\"5\">Tools for building Silverlight Plug-ins with VB<\/font><\/h2>\n<\/h2>\n<p>Unless you\u2019re really into notepad , download the tools for Silverlight. The VS project templates alone are worth the bandwidth required, as they\u2019ll get you started in the right direction. In addition, many of the more interesting things you can do with Silverlight (e.g., animations, embedding videos, etc) are pretty tedious to wire-up by hand in XAML; using Expression Blend makes the process <b><i>*much*<\/i><\/b> easier. All of the components mentioned below are available at: <a href=\"http:\/\/silverlight.net\/GetStarted\/\">http:\/\/silverlight.net\/GetStarted\/<\/a>. I\u2019ve just included them here for convenience.<\/p>\n<h3>\n<h2><font face=\"Calibri\" color=\"#17365d\" size=\"4\">What to download<\/font><\/h2>\n<\/h3>\n<ul>\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=88986&amp;clcid=0x409\"><b>Silverlight 1.1 Runtime<\/b>: <\/a>This is the version of Silverlight that enables you to write VB code-behind. It includes a version of the factored .NET Framework, including the VB runtime (Microsoft.VisualBasic.dll).\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=89147&amp;clcid=0x409\"><b>ASP.NET Futures Runtime<\/b>: <\/a>Among other features, the controls included in this download make it much easier to embed Silverlight controls and rich media in existing ASP.NET web applications\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=89146&amp;clcid=0x409.\"><b>VS Orcas Beta 1<\/b>:<\/a> <b><i>Note: <\/i><\/b><i><u>You need to have the official Orcas Beta 1!<\/u><\/i> Earlier CTPs won\u2019t cut it. Even if you choose not to use Visual Studio to do your development, you\u2019ll need the Beta 1 VB 9.0 compiler, as it includes some changes required to target the slimmed-down .NET Framework.\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=89149&amp;clcid=0x409\"><b>VS Add-On for Silverlight:<\/b><\/a> This component provides some project templates and IDE changes for building Silverlight applications in VB (and C#).\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=79076&amp;clcid=0x409\"><b>Expression Blend 1.1 CTP<\/b><\/a>: The VS Add-On mentioned above does not include a designer for Silverlight; editing XAML is done in the XML editor. While the XML editor does support IntelliSense, I find it much easier to perform the visual and story board layouts in Expression Blend. (See the note below for the workaround required to use VB &amp; Blend.)\n<li><a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=89145&amp;clcid=0x409\"><b>Silverlight SDK<\/b>:<\/a> The most interesting content in the SDK is the reference documentation for the VB runtime. It basically details what functions and types in Microsoft.VisualBasic.dll. The download also includes samples, although I generally prefer to see them online here: <a href=\"http:\/\/silverlight.net\/quickstarts\/managed.aspx\">http:\/\/silverlight.net\/quickstarts\/managed.aspx<\/a>.<\/li>\n<\/ul>\n<p>If you run into any problems getting this stuff installed, please post the problem at the forums, <a href=\"http:\/\/silverlight.net\/forums\/\">http:\/\/silverlight.net\/forums\/<\/a>.<\/p>\n<h3>\n<h2><font face=\"Calibri\" color=\"#17365d\" size=\"4\"><\/p>\n<h2>Workarounds<\/h2>\n<p><\/font><\/h2>\n<\/h3>\n<p>Okay, almost there\u2026 we just need to work around one somewhat confusing bug in Blend you\u2019ll run into when you try to create a VB project:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/Blend_Error%5B5%5D.png\"><img decoding=\"async\" height=\"142\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/05\/Blend_Error_thumb5B15D.png\" width=\"878\" border=\"0\"><\/a><\/p>\n<p>The problem here is that Expression Blend is configured to build VS 2005\/VB 8.0 projects, but only VB 9.0 supports building Silverlight 1.1 applications. To work around the issue, you\u2019ll have to re-configure Blend to use VS Orcas &amp; VB 9.0 (Sigh!). Here\u2019s how\u2026<\/p>\n<ol>\n<li>Close Microsoft Expression Blend.\n<li>Navigate to Program FilesMicrosoft ExpressionBlend 1.1.\n<li>Create a new XML file in that folder and then rename the file to Blend.exe.config.\n<li>Paste the following XML snippet into Blend.exe.config.\n<li>Save Blend.exe.config and close it.&nbsp;\n<li>Open Microsoft Expression Blend. Select \u201cVisual Basic\u201d as the language and you can create \u201cSilverlight Application\u201d projects. <\/li>\n<\/ol>\n<p>Blend.exe.config<\/p>\n<blockquote><p><font color=\"#0000ff\" size=\"2\"><\/p>\n<p>&lt;?<\/font><font color=\"#a31515\" size=\"2\">xml<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">version<\/font><font color=\"#0000ff\" size=\"2\"> =<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">1.0<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">?&gt; <\/p>\n<p>&lt;<\/font><font color=\"#a31515\" size=\"2\">configuration<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/font><\/p>\n<p><font color=\"#0000ff\" size=\"2\">&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">startup<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">supportedRuntime<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">version<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">v2.0.50727<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">safemode<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">true<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<\/font><font color=\"#a31515\" size=\"2\">requiredRuntime<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">version<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">v2.0.50727<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">safemode<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">true<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp; &lt;\/<\/font><font color=\"#a31515\" size=\"2\">startup<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">runtime<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">assemblyBinding<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">xmlns<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">urn:schemas-microsoft-com:asm.v1<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">dependentAssembly<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">assemblyIdentity<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">name<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">Microsoft.Build.Framework<\/font><font size=\"2\">&#8221; <\/font><font color=\"#ff0000\" size=\"2\">publicKeyToken<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">b03f5f7f11d50a3a<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">culture<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">neutral<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">bindingRedirect<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">oldVersion<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">0.0.0.0-99.9.9.9<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">newVersion<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">3.5.0.0<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/<\/font><font color=\"#a31515\" size=\"2\">dependentAssembly<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">dependentAssembly<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">assemblyIdentity<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">name<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">Microsoft.Build.Engine<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">publicKeyToken<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">b03f5f7f11d50a3a<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">culture<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">neutral<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<\/font><font color=\"#a31515\" size=\"2\">bindingRedirect<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">oldVersion<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">0.0.0.0-99.9.9.9<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\"> <\/font><font color=\"#ff0000\" size=\"2\">newVersion<\/font><font color=\"#0000ff\" size=\"2\">=<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">3.5.0.0<\/font><font size=\"2\">&#8220;<\/font><font color=\"#0000ff\" size=\"2\">\/&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/<\/font><font color=\"#a31515\" size=\"2\">dependentAssembly<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/<\/font><font color=\"#a31515\" size=\"2\">assemblyBinding<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&nbsp;&nbsp;&nbsp; &lt;\/<\/font><font color=\"#a31515\" size=\"2\">runtime<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p>&lt;\/<\/font><font color=\"#a31515\" size=\"2\">configuration<\/font><font color=\"#0000ff\" size=\"2\">&gt; <\/p>\n<p><\/font><\/p><\/blockquote>\n<p>Just keep in mind that if you uninstall Orcas and you want to continue using Blend, you\u2019ll need to delete Blend.exe.config.<\/p>\n<h3>\n<h2><font face=\"Calibri\" color=\"#17365d\" size=\"5\">A lap around the tools<\/font><\/h2>\n<\/h3>\n<p>You\u2019re pretty much good to go at this point. With the installation of the Visual Studio Add-On, two new project types are available: a standalone Silverlight Web Application and Silverlight Class Library.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/NewProjectDialog_Silverlight%5B2%5D.png\"><img decoding=\"async\" height=\"345\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/05\/NewProjectDialog_Silverlight_thumb.png\" width=\"470\" border=\"0\"><\/a><\/p>\n<p>I generally find the \u201cSilverlight Project\u201d the most useful template to work with. It includes basic XAML and VB code-behind files, Javascript goo required to instantiate the control, and a boilerplate HTML page that hosts the control. The project can be debugged by F5\u2019ing TestPage.html, although Edit-and-Continue is not supported for Silverlight projects. <b><\/b><\/p>\n<p>The programming model for Silverlight 1.1 is very similar to that of ASP.NET and WPF: the UI aspects of the control are declared in the .xaml file, and events are handled in the code-behind (.xaml.vb) file. Similar to desktop WPF, each named UI element declared in XAML has a corresponding variable that can be referenced in code-behind.<\/p>\n<p>&nbsp; <a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/SolutionExplorer_Silverlight%5B4%5D.png\"><img decoding=\"async\" height=\"188\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/05\/SolutionExplorer_Silverlight_thumb5B25D.png\" width=\"240\" border=\"0\"><\/a><\/p>\n<p>For example, the following TextBlock declared in Page.xaml\u2026<\/p>\n<blockquote>\n<p><font face=\"Courier New\" size=\"2\">&lt;TextBlock x:Name=&#8221;TextBlock1&#8243; Text=&#8221;1234&#8243; \/&gt;<\/font> <\/p>\n<\/blockquote>\n<p>Can be referenced in Page.xaml.vb as follows\u2026<\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;&nbsp;&nbsp; <\/span><span>Private Sub <\/span>TextBlock1_MouseEnter() <span>Handles <font color=\"#000000\">TextBlock1.MouseEnter<\/font><\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color=\"#0080ff\"><span>Me<\/span><\/font>.TextBlock1.Opacity = 1<\/font><\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span><span><font color=\"#000000\">&nbsp;&nbsp;&nbsp; <\/font><\/span><\/span><span><span><span>End Sub <\/span><\/span><\/span><\/p>\n<p>If you\u2019re interested in checking out what\u2019s available in the .NET Framework for Silverlight, you can poke around in the Add Reference dialog and\/or Object Browser. The former is filtered to only show what you can use in Silvelight 1.1.<\/p>\n<p>The Silverlight tools are very much in an Alpha state, so your mileage may vary a bit. In particular, debugging VB applications can be a somewhat bumpy ride\u2026 so please let us know on the <a href=\"http:\/\/silverlight.net\/forums\/\">forums<\/a> if you run into any issues.<\/p>\n<h3>Additional resources to check out<\/h3>\n<p>There are already some pretty vibrant community resources on Silverlight popping up. Many of these include sweet looking samples, and the amount of content should continue to grow in the coming months. The main place to keep an eye on is the <a href=\"http:\/\/silverlight.net\/\">main Silverlight site<\/a> and the <a href=\"http:\/\/silverlight.net\/forums\/\">Silverlight forums<\/a>.<\/p>\n<p>By all means, feel free to share your impressions of VB on Silverlight. It\u2019s early and we could really use the feedback. Thanks!<\/p>\n<p>&nbsp;<\/p>\n<p>Joe &amp; The VB Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; One of the great things about being on the VB team is that we\u2019re generally in the loop early and often with teams developing new technologies and products. It\u2019s always exciting to see ideas take shape, evolve into a product, and eventually hit the market\u2014often after four or five code names, a couple of [&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":[192,195],"tags":[80,94,117,137],"class_list":["post-6183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-visual-basic","tag-joe-binder","tag-linqvb9","tag-orcas","tag-silverlight"],"acf":[],"blog_post_summary":"<p>&nbsp; One of the great things about being on the VB team is that we\u2019re generally in the loop early and often with teams developing new technologies and products. It\u2019s always exciting to see ideas take shape, evolve into a product, and eventually hit the market\u2014often after four or five code names, a couple of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6183","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=6183"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6183\/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=6183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=6183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=6183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}