Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3999642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:41:01+00:00 2026-05-20T07:41:01+00:00

My tech lead told me its possible to develop Silverlight apps solely with Javascript.

  • 0

My tech lead told me its possible to develop Silverlight apps solely with Javascript. I did some googling and binging; it likes this was the primary development method for developing pre Silverlight 2.0. It also seems to have lost favor to C# as of SL 2.0.

Is it still possible to develop Silverlight apps solely with Javascript? I know Silverlight and the browser have extensive scripting capabilities and can be scripted via JS; but can I build an SL app with it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:41:02+00:00Added an answer on May 20, 2026 at 7:41 am

    It is still possible, though the experience is very different. You must load an initial Root visual element via a source property on the Silverlight object referencing a XAML file on the server, but after that you have full access to the visual tree via javascript.

    The below Test.html and Root.xaml files together will produce a testable page if placed in the same folder.

    Note the differences from a “standard” (i.e. *.xap source) scenario – the ‘source’ parameter on the SL object tag is set to a .XAML file instead of a .XAP file. The .XAML file is also different from what you would get in a default SL application in VS: the x:Class=”MyApp.MainPage” is missing from the root element, and the root element is a Grid (or any Visual element) instead of a UserControl element. This is because there is no application (at least not loaded from the .XAP – I assume the SL control actually creates a default application instance in the process of loading the Root.XAML file), and no UserControl because there is no code-behind. This is consistent with the Pre-SL1.1/2.0 experience of no UserControls.

    Additionally, you will need to reference Javascript API for Silverlight Reference in your javascript coding. Have fun with the FindName method and/or walking the Visual Tree! Those are the only ways to get references to any visual objects to manipulate from your code!

    Test.html

    <html>
        <body>
          <object id="slObject" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="400" height="300">
                  <param name="source" value="Root.xaml"/>
                  <param name="onError" value="onSilverlightError" />
                  <param name="background" value="white" />
                  <param name="minRuntimeVersion" value="4.0.50826.0" />
                  <param name="autoUpgrade" value="true" />
                  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
                      <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
                  </a>
            </object>
            <input type="button" onclick="sayGoodBye();" value="Say Goodbye, Silverlight!" />
            <script>
                function sayGoodBye() {
                    var slObject = document.getElementById('slObject');
                    var slContent = slObject.Content;
                    var layoutRoot = slContent.FindName('LayoutRoot');
                    var message = layoutRoot.FindName('Message');
                    message.Text = 'Goodbye';
                }
            </script>
        </body>
    </html>
    

    Root.xaml

    <Grid x:Name="LayoutRoot" Background="White"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400">
        <TextBlock x:Name="Message" Text="Hello, Silverlight!" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" />
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read some articles about Comet tech. All of them mentioned that the long-life
Our inHouse tech have installed our own app to some of our iPods 3.x
In the http://wwwendt.de/tech/dynatree/index.html it says toDict() Convert the tree into a JavaScript object. See
Is Powershell a mature enough tech for enterprise to be using? Are its many
Is it possible to use the OpenSSO fedlets with PHP (or tech. other than
I recently applied to several full time positions among some of the tech giants,
In Fragments for All , Xavier Ducrohet, Android SDK Tech Lead says Google releases
I followed the instructions on pyxis-tech.com to test our Silverlight application on TFS2010 on
I am trying to follow this tutorial http://damianm.com/tech/nhibernate-mvc-and-ninject/ but I am running into some
I just want to know that which languages or tech. did google use to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.