Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Silverlight Graphs RSS

5 replies

Last post Jan 25, 2008 02:58 PM by bluearc

(0)
  • varshamane

    varshamane

    Member

    76 Points

    28 Posts

    Silverlight Graphs

    Jan 25, 2008 08:49 AM | LINK

    Hi All,

     I am using Silverlight with Dot Net Nuke. I have develop a normal web application where I have created Graphs. Now I want to include this in my Dot Net Nuke Project but the problem is that I can see my graph.

    Any suggestion???

     Thanks in advance...

    Silverlight Graphs

  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: Silverlight Graphs

    Jan 25, 2008 11:06 AM | LINK

    I am not sure what the issue is as your description is a bit vague.  Does it work outside of DNN?  Once inside DNN webpart, is there an issue with resolving the scripts?  I'd open it in Firefox with FireBug and see what is actually getting rendered.

    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • varshamane

    varshamane

    Member

    76 Points

    28 Posts

    Re: Silverlight Graphs

    Jan 25, 2008 11:43 AM | LINK

    Thanks for the reply sir. Actually I made new project where graph is properly working. When I added the code in DNN user controls it not working I dont know why? Here is the code:

    <script type="text/javascript" src="/2008/js/Silverlight.js"></script> //2008 is DNN project name

    <script type="text/javascript">

    function createSilverlight()

    {

    //debugger;

    Silverlight.createObjectEx({

    source:
    "~/Test/Page.xaml", //Test is a folder

    parentElement: document.getElementById("SilverlightControlHost"),

    id: "SilverlightControl",

    properties: {

    width:
    "300px",

    height: "300px",

    version: "1.1",

    enableHtmlAccess: "true"

    },

    events: {}

    });

     

    document.body.onload =
    function() {

    var silverlightControl = document.getElementById('SilverlightControl');

    if (silverlightControl)

    silverlightControl.focus();

    }

    }

    </script>

    <div id="SilverlightControlHost">

    <script type="text/javascript">

    createSilverlight('~/Test/Page.xaml');

    </script>

    </div>

    above code is in user control of DNN Project and I have add the silverlight project and silverlight class libaray in DNN Project.

     But its not working. Any suggestions...

    Thanks again.

  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: Re: Silverlight Graphs

    Jan 25, 2008 02:48 PM | LINK

    Hopefully someone else will know how DNN hosts its controls and might help you.  You might want to consider going to DNN's forums and asking there where they have more DNN expertise.

    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • WynApse

    WynApse

    Star

    14658 Points

    343 Posts

    Re: Silverlight Graphs

    Jan 25, 2008 02:54 PM | LINK

    If you go to SilverlightCream.com and search for DNN on the Search page, you'll find 7 entries from Michael Washington of

    http://dnnsilverlight.adefwebserver.com/

    He answers posts sometimes and has lots of good stuff over there.

    -Dave

    Stay in the 'Light
    Silverlight MVP
    http://www.wynapse.com
  • bluearc

    bluearc

    Participant

    1484 Points

    325 Posts

    Re: Silverlight Graphs

    Jan 25, 2008 02:58 PM | LINK

    varshamane

    source: "~/Test/Page.xaml", //Test is a folder

     

    I think the proble is. "~" because javascript don't know abot "~", that it is used for root. I suggest use older way to get the virtual path

    i.e. using "../ ", because "~" is only ment for server controls and for asp.net not for javascript

    "If this answer helped you then please mark it answered"

    Ravi Kant Srivastava
    (Application Developer)
    Scope Technology
    India/South Africa