Silverlight widget become blank when drag/drop
GoogleCodeExporter opened this issue · comments
What steps will reproduce the problem?
1. When you drag and drop silverlight widget (digg for example), it become
blank when drag/drop
Solution to this problem :
In my implementation of dropthings for poshboard, I used literaloutput
instead of silverlight container in the widget aspx page, and call the
classic html code for loading the xapfiles, and all is ok with silverlight
drag/drop (and loading is fast)
I can provide some code samples on this if you think it's usefull for the
main dropthings project ?
antoine
Original issue reported on code.google.com by pilos...@gmail.com
on 26 Feb 2009 at 11:16
Sure, please send me the fix.
Or you can join this project and implement the fix yourself.
Original comment by omaralzabir@gmail.com
on 26 Feb 2009 at 3:16
[deleted comment]
[deleted comment]
Would love to help on dropthings, but I'm unfortunately too busy at this time
to help
properly. Count me in for March.
My method of silverlight hosting is quite simple but works well :
1) Instead of an ASP:Silverlight control in the widget .acsx, I use a literal
output
, as in your html widget :
***
<center><asp:Literal ID="Output" runat="server" /></center>
****
2) in the "OnPreRender" function, I read a HTML on the server (by the way, this
is
the basic html rendering page of a silverlight control, I attached the file for
example)
***
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
StreamReader HTMLSilverlight = new
StreamReader(Server.MapPath("~/silverlight/mySilverlightControl.html"));
string targetHtml = HTMLSilverlight.ReadToEnd();
this.Output.Text = targetHtml;
}
***
3) I eventually use a "height" state for the widget, I can change the height
property
in the html code before loading it in the output.Text (not mandatory if you set
the
height directly in your silverlight control)
That may not be the best way to achieve this, but this work very well :
drag/drop of
silverlight control works like that, and loading is pretty fast.
Let me know if you want additional info.
regards,
antoine
Original comment by pilos...@gmail.com
on 26 Feb 2009 at 3:55
Attachments:
I experience slightly different behaviour. It was always blank for codeplex
version ,
but the latest version extracted from svn here at google does differ. After the
very
first drag/drop there is some delay for Silverlight widget to refresh itself (
blank, message "Loading Digg Stories" , refreshed ). However, subsequent
drag/drop
results in a blank widget. Browser - Firefox in my case. Perhaps, it is a minor
thing
which may fixed without changing ASP:Silverlight approach.
Original comment by Mitiag...@gmail.com
on 26 Feb 2009 at 11:32
In fact, in Internet Explorer the problem does not exist for my configuration,
Silverlight digg widget is always refreshed.
Original comment by Mitiag...@gmail.com
on 26 Feb 2009 at 11:39
Yes it works for IE, but not in Chrome/Firefox. That's why I used the
literaloutput
that works in every browser.
I agree that this could be fixed with changing ASP:Silverlight, but I didn't
found a
way yet.
Original comment by pilos...@gmail.com
on 27 Feb 2009 at 12:27
Closed
Original comment by glope...@gmail.com
on 15 Feb 2010 at 4:04
- Changed state: Fixed