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

  • SEARCH
  • Home
  • 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 6106155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:02:58+00:00 2026-05-23T14:02:58+00:00

I’ve created a Silverlight application that basically builds a cross section image of a

  • 0

I’ve created a Silverlight application that basically builds a cross section image of a multi-layered sphere (think concentric circles) from data stored in a JSON string. The JSON string is an array of diameter+color values, and looks like so:

[{"diam":100,"color:"#ffffff"},{"diam":150,color:"#ff0000"}]

I have everything working within Silverlight. When I load the app in a browser with the JSON above, I successfully get a rendering of two concentric circles, the inner circle is white (#ffffff) with a diameter of 100 pixels, and the outer circle is red (#ff0000) with a diameter of 150 pixels. Great.

Now, I have to integrate this within an HTML page and pass that JSON data from javascript to Silverlight. I’m using the HTMLBridge capabilities that SIlverlight offers but I’m having trouble calling the Silverlight method that builds the viz from Javascript.

The method name in Silverlight is BuildViz(), which removes all existing elements from the Silverlight canvas and then re-builds the visualization from a public property named JSONData. JSONData calls the BuildViz() method upon setting it’s value:

[ScriptableMember()]
public string JSONData { 
    get { return _JSONData; } 
    set { _JSONData = value; BuildViz(); } 
}

I have tried exposing the JSONData to javascript using HTMLBridge and setting it’s value via javascript but it seems that the BuildViz() method is not called (or it is called but it has no effect on my canvas). Not sure where to go from here. The examples of HTMLBridge that I’ve seen online are very basic and only deal with simple methods like converting a string to uppercase and returning it’s value to the calling javascript. I need to actually run a method within Silverlight.

Any help would be greatly appreciated.

TIA

  • 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-23T14:02:58+00:00Added an answer on May 23, 2026 at 2:02 pm

    try this, or something like it

    var silverlightObject = document.getElementById('_the_id_of_your_silverlight_obj_');
    var jsonData = { value: 'hello world' }
    
    // invoke setter
    silverlightObject.Content._the_object_containing_your_method_.set_JSONData(jsonData);
    
    // invoke getter
    jsonData = silverlightObject.Content._the_object_containing_your_method_.get_JSONData();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.