Silverlight Refresh Question

14 posts, 1 answers
  1. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 16 Jul 2008 Link to this post

    Hello,

    I've placed a couple of Silverlight controls on an .aspx page and they work fine... as expected.

    The minor issue is that when my page is refreshed or updated via an AJAX call the Silverlight objects disappear. Pressing F5 to reload the page works fine but I thought I'd ask if there is some setting that I've missed.

    Should I place some code in the 'onload' event to refresh the Silverlight objects? It seems like a simple thing but before I start creating a hack I thought I'd ask around.

    Please let me know and thanks!

    Dave
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 17 Jul 2008 Link to this post

    Hi David,

    This seems weird.

    Is the Silverlight object somehow affected by the ajax request? Is the object defined into an update panel?

    When you remove the Telerik Silverlight controls from the Silverlight app is the problem still there?


    All the best,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 17 Jul 2008 Link to this post

    Hello,

    I've got several objects inside a radAJAX update panel which is in an .aspx page. Some are Flash objects which work as expected and two new Silverlight objects.

    One silverlight object is a new radCube and the other is a simple MS Calendar (no radControls in the calendar project).

    When I open a radWindow (via ajax) both the silverlight objects disappear. When the radWindow is closed they remain hidden. Of course they appear then a full postback is done but not when an ajax event takes place to refresh part of the screen.

    An example of this can be seen at the test site:
     http://www.officeautomatedsystems.com/clientweb/oasys/

    When you arrive at the page simply click on the "contact us" menu option that is on the left and a radWindow will appear. You'll notice that the silverlight objects have already disappeared. Closing the radWindow will show clearly that they're not rendered.

    How can I attach a file to this thread? Please let me know and I'll attach the page in question.

    Thanks,

    Dave
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 17 Jul 2008 Link to this post

    Hi David,

    The Telerik forums do not allow client attachments. You can send us the project by opening a new support ticket. Generally it doesn't matter what product you will choose for the ticket, our colleagues will forward it to us if it is about Silverlight :)

    Kind regards,
    Valeri Hristov (Silverlight Team)
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 17 Jul 2008 Link to this post

    Hello,

    I've updated the page that I referenced before so that it only has one Silverlight object on it and it's a radCube.

    Thought I'd mention it so that if you check the page you won't look for two objects as mentioned before.

    Thanks,

    Dave
  7. Miroslav Paskov
    Miroslav Paskov avatar
    6 posts
    Member since:
    Oct 2007

    Posted 17 Jul 2008 Link to this post

    Hi Dave,

    I had problems with disappearing html objects over silverlight before and I solved it by setting the Windowless property of the asp:Silverlight object to true.

    Does that help?

    miro
  8. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 17 Jul 2008 Link to this post

    Hello Miroslav,

    Thanks for the idea. Unfortunately it didn't have any affect. I reposted the page with the new settings even though the Silverlight objects still disappear.

    I'll keep at it...

    Thanks!

    Dave
  9. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 24 Jul 2008 Link to this post

    Hi David,

    Instead of the asp:Silverlight tag, you can use an object to embed the silverlight cube, like so:

    1 <object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="100%">  
    2     <param name="source" value="ClientBin/ObjectEmbedding.xap"/>  
    3     <param name="background" value="white" /> 
    4     <href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">  
    5             <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>  
    6     </a> 
    7 </object> 

    where ClientBin/ObjectEmbedding.xap is the path to your .xap file. You can find an example of object embedding when you create a new silverlight application - by default both an .aspx and an .html page are created, the .html one uses object embedding.

    If the Silverlight object disappears in that case as well, then probably it is being updated as a result of a callback.

    Does that work for you?

    Best wishes,
    Miroslav
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  10. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 24 Jul 2008 Link to this post

    Hello,

    Thanks for the reply and workaround.

    This actually works but it causes some other issues that I'll start debugging.

    As it turns out, one feature we have is a radWindow opens on top of the silverlight "objects" (now declared as objects). The radWindow frame is not rendering completely when over the 'object'.

    I've seen this before with Flash objects so I'll review those notes and see if that fixes it.

    Thanks again for your help,

    Dave
  11. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 25 Jul 2008 Link to this post

    Hello David,

    Try setting the WindowLess property to true - this should help in such scenario.



    All the best,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  12. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 25 Jul 2008 Link to this post

    Hello,

    I don't see a Windowless property for the radWindow.

    Can you please give me a hint as to where I can find it?

    Thanks,

    Dave
  13. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 28 Jul 2008 Link to this post

    Hello,

    So, the suggested solution works pretty well however a small part of the radWindow border is not rendering correctly.

    This can be seen at this site: http://www.officeautomatedsystems.com/

    Once the home page opens you see a radCube spinning but also notice that the header at the top is also a simple Silverlight control.

    Now, from the left menu, click on 'contact us' and you'll see a radWindow open. Notice that most of the border renders correctly except on the right hand side. Two small areas over the Silverlight controls are not rendering.

    Any ideas as to what I should adjust?

    Please let me know and thanks!

    Dave
  14. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 28 Jul 2008 Link to this post

    Hello David,

    the Windowless property is on the Silverlight object. This is a common Silverlight object property - not related to RadCube.

    Please see this thread about how to set the param:
    http://silverlight.net/forums/t/20776.aspx


    BTW: On our machines the RadWindow was rendered correctly over the RadCube Silverlight object. However when you have scrolls on the page and start scrolling the both Silverlight objects - the one on top and the RadCube were flickering over the RadWindow. Please try setting the Windowless param to both objects and let us know how it goes.

    Greetings,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 28 Jul 2008 Link to this post

    Hello again,

    Well, that is the setting to use. The radWindow now renders 100% correct!

    Please add this little detail to the documentation. I'm sure it will be needed again.

    Thanks once again for your help!

    Dave
Back to Top
DevCraft banner