Silverlight 5 plugin with Safari 5.1 - silverlight

I have a Silverlight 3 application that contains 1 code line (it's a part of real project):
var doc = HtmlPage.Document;
In Safari 5.1 (Windows 7 SP1, Silverlight plugin 5.0.61118.0) I get the Exception in this line:
Unable to cast object of type System.Windows.Browser.HtmlElement to type System.Windows.Browser.HtmlDocument
So, I don't have any access to browser DOM model.
In other browsers everything is ok.
Can somebody help me with this if it's possible ?

I have the same problem, it seems to only occur on Safari for Windows with the Silverlight plugin 5.0.61118.0. The problem seems to have been introduce with Silverlight 5.0.
Also, you cannot access: HtmlPage.Window
According to Microsoft officially Safari for Windows is not a support platform, see:
http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx (click System Requirements)
In my testing I found that the issue does NOT occur in Silverlight 4 but DOES occur in Silverlight 5.
This is slightly confused because if you try to install Silverlight 4 on Safari for Windows from this link:
http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0
Then you end up with a Silverlight 5 installation.
I found that you use IE to visit this link then Save the download EXE, then install the EXE on Safari for Windows you will get a Silverlight 4 install and from my testing this works. Thus, I am advising my customers who face this issue to install Silverlight 4 as described.

Try this and see if this works (my application uses the navigation framework):
As the error has something to do with the NavigationJournal and in SL we have some control over it I just changed the Journal ownership to:
sdk:Frame JournalOwnership="OwnsJournal"
On the MainPage.xml where the navigation takes place in my app. In this way we lose the browsers back button/navigation but we can implement our own inside the SL app.

Related

Is Web Browser control in WPF perfect enough to support modern browser features?

We did some experiments loading sample HTML pages in to the latest version of WPF Web browser control which comes with VS 2017 IDE. Seems perfect in most of the cases except when loading following URLs which throws error messages, which is not the case in modern web browsers like IE, Chrome.
E.g.
1. Error message for W3Schools:
Error message for HTML5Rocks :
Please let us know whether WPF browser control is perfect enough to render/support modern web technology features in our desktop application projects?
-Thank you
I believe the "modern" browser experience on Windows in Microsoft Edge. You could use the WebView control to use it in your WPF application as explained in this blog post. This assumes you are targeting the April 2018 release of Windows 10 or later.
If your users are still in Windows 7, you may want to look for a third-party browser control such as for example CefSharp.

Silverlight 5 Backward Compatibility

I have a Silverlight application developed with version 4.0. I tried running it with Silverlight 5 client and everything seems to be fine up to now.
But I am wondering; if my users installs Silverlight 5 for client, is it sure my application will still work well? Do I have to run all my Test Cases again?
If anyone notices something that has been broke between versions, please list it here! :)
Thanks
There's little evidence around the internet at the moment, other than that published by Microsoft, which can be found here and here, which states, to summarise:
Several changes have been made to the Silverlight runtime and the
Silverlight Tools between Silverlight 4 and Silverlight 5. For these
changes, the following principles apply:
Most Silverlight 4 applications will work with Silverlight 5 without
any changes.
When breaking changes are required, Silverlight will try to maintain
support for the old behavior, as well as the new behavior, by using a
quirks mode.
Nevertheless, some changes made to Silverlight components can
potentially cause your older Silverlight-based applications to fail
(compile time, XAML load time, or possibly design time) or to behave
differently.
And,
There are no known breaking changes between Silverlight 4 and
Silverlight 5 in the Silverlight core runtime. Applications that were originally compiled using Silverlight 4 tools, and that continue to target the Silverlight 4 runtime, should work without issues on a client that has the Silverlight 5 runtime.
If your project references any Silverlight SDK client assemblies [...] make sure that your project
specifically references the Silverlight 5 version of the SDK client
assemblies [...]. A project that targets Silverlight 5 cannot use the Silverlight
4 SDK assemblies.
There's more information in the links I provide, for instance, related to quirks mode, third party references, and behavioural changes.
I have a project with a Silverlight 4 tool used to display a barchart etc. The Project upgrade to VS2013 automatically upgraded to Silverlight 5 and there were no warnings. I worked on other areas of the project and only by chance did I actually run it in debug mode to find that the display was broken somewhere inside the tool. I managed to scamper back to VS2012 and scavenge the changes I had made in the VS2013 version of the project.

Can Silverlight 4 and 5 plugins live side by side?

With SL plugin 5.0.60818.0 I get an error when I open this page:
http://demos.telerik.com/silverlight/#Docking/FirstLook
(I hope someone from telerik sees this).
I uninstalled SL 5 and reinstalled SL 4, and the page opens fine.
Is there some way I can have both SL 4 and SL 5 runtimes installed, and just configure my browser to use the one I want?
The SL4 and SL5 SDK's can live side-by-side, why not the plugins?
Not on the same OS. You can create a Virtual Machine using Microsoft Virtual PC and use that for one of the plug-ins.

debug an xbap on firefox?

I am starting to write an xbap (wpf web app).
I create a new project and run it and Firefox fails (it just keeps trying to open it with "Windows Presentation Foundation Host).
I know that Firefox and Microsoft don't really see eye to eye, but surely there is a way to do this now days?
Saw this post that shows a hack of copying out a DLL from a Windows XP machine. But my users will not do that (I don't even want to do that!)
Does this mean I have to abandon Firefox as my default browser until I am done developing my xbap?
NOTE: I am using Windows 7 and Visual Studio 2010 Ultimate and Firefox 3.6.12
I don't know what exactly your problem is, but here is a Scott Hanselman blog post detailing a WPF application deployed as an XBAP (not XBAB) using VS 2008 with .NET 3.5. It doesn't say anything about WPF 4 (and the .NET 4 runtime, the post is from 2008) or what version of Firefox he was playing with but I hope this demonstrates it is possible and gives you a starting point for more detailed investigations.
Edit - Well, I should have dug a little deeper. It appears that Windows 7 won't support XBAPs in FireFox. There is a Firefox Add-on to Support XBAPs and Loose XAML that is installed with the .NET 3.5 runtime but it is not included in Windows 7 and this link suggests it can't be installed on Windows 7.
You could run IE Tab Plus (Firefox plug-in) and get it to default to IE when you open something from the localhost.

Silverlight installed in Firefox 3, but not detected/activated

As the title says really. We are working on a Silverlight banner on a redesign of our site and the Silverlight content works fine in all browsers except Firefox 3 (PC v3.0.7,8 or Mac v3.0.8). The Add-in is marked as having been installed, however.
The problem page is at:
http://clearvision.programx.co.uk/Schools/Students.aspx
(Note: we know of the crap HTML mark-up, that is a bug in SiteFinity, the CMS we're having to use. We have tried with and without this erroneous content with no effect.)
I've seen a number of reports (this one being particularly good: http://tempvariable.blogspot.com/2008/04/silverlight-and-firefox-3.html) about Firefox 3 having problems.
The SL control is Silverlight 1.0.
Any help much appreciated, I really do nto want to have to write alternative content for Firefox users!
I checked your Silverlight.js file and it was version 1.0 of the .js file. I think that upgrading to the 2.0 version of Silverlight.js file (which was updated for FF3) may solve your issue.

Resources