This is a migrated thread and some comments may be shown as answers.

Silverlight Refresh Question

13 Answers 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dave Navarro
Top achievements
Rank 2
Dave Navarro asked on 16 Jul 2008, 11:12 PM
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

13 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 17 Jul 2008, 06:33 AM
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
0
Dave Navarro
Top achievements
Rank 2
answered on 17 Jul 2008, 04:48 PM
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
0
Valeri Hristov
Telerik team
answered on 17 Jul 2008, 05:51 PM
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
0
Dave Navarro
Top achievements
Rank 2
answered on 17 Jul 2008, 09:10 PM
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
0
Miroslav Paskov
Top achievements
Rank 1
answered on 17 Jul 2008, 09:46 PM
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
0
Dave Navarro
Top achievements
Rank 2
answered on 17 Jul 2008, 10:44 PM
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
0
Miroslav
Telerik team
answered on 24 Jul 2008, 08:01 AM
Hi David,

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

<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="100%">  
    <param name="source" value="ClientBin/ObjectEmbedding.xap"/>  
    <param name="background" value="white" /> 
    <href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">  
            <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>  
    </a> 
</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.
0
Dave Navarro
Top achievements
Rank 2
answered on 24 Jul 2008, 05:57 PM
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
0
Georgi Tunev
Telerik team
answered on 25 Jul 2008, 12:58 PM
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.
0
Dave Navarro
Top achievements
Rank 2
answered on 25 Jul 2008, 04:41 PM
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
0
Dave Navarro
Top achievements
Rank 2
answered on 28 Jul 2008, 05:41 AM
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
0
Accepted
Valentin.Stoychev
Telerik team
answered on 28 Jul 2008, 07:51 AM
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.
0
Dave Navarro
Top achievements
Rank 2
answered on 28 Jul 2008, 04:32 PM
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
Tags
General Discussions
Asked by
Dave Navarro
Top achievements
Rank 2
Answers by
Valentin.Stoychev
Telerik team
Dave Navarro
Top achievements
Rank 2
Valeri Hristov
Telerik team
Miroslav Paskov
Top achievements
Rank 1
Miroslav
Telerik team
Georgi Tunev
Telerik team
Share this question
or