Anyone using Windowless mode in a Silverlight business app without animations? - silverlight

We have a standard business application written in Silverlight for which we need to use Windowless Mode. This "feature" to use a Telerik Silverlight component.
Using Google I have found lots of bad things that can go wrong with windowless mode with regards to mixing HTML content and animations. I am interested in knowing if bad things will happen if the silverlight app is the only content in the browser window.
Thanks in advance for sharing your experience.
Mike

Windowless actually improved the way Silverlight and html interact. Without windowless set, Silverlight is just painted on top of the html. Setting windowless is the only way to have html on top of silverlight or to have a transparent silverlight application.
The major downside to windowless is that it forces silverlight to be software rendered instead of hardware rendered. This means that the power of the GPU can't be utilized for things like animations.
If the silverlight app is the only thing in the browser window, the only real difference between windowless and not is the performance issue mentioned above.

An example of Windowless mode with lots of animations and mixed in HTML is the Office Labs Silverlight site. NOTE: You need to click the "Try in Silverlight" on the plain HTML version of the site to see the Silverlight version.
That site uses a floating iframe to display HTML inside of the Silverlight content. Most of the animations work just fine, however, you can't scale the HTML very easily so the HTML is hidden while some of the animations are performed.
Let me know if you have any other questions about the site.

Related

Either Free or Paid alternative to Silverlight Web Browser Control to target visibility(z-index) problems?

I am using Silverlight WebBrowser Control in one of my application, and all the Silverlight Content hides behind the WebBrowser Control.
I know, we can't do anything about it and have read about the Air Space Issue also. I have also gone through the following links:-
How to place a WebBrowser control below other controls?
But its really required to solve it for my application, so I am looking for some alternatives, either FREE or can be PAID too.
I have read about the FireFox Gecko browser, but it seems it is a pure Windows Forms Control and I wonder whether I can use it in Silverlight or not, and also whether it will solve the z-index issues if we can at all use it in silverlight.
Does any body has any solution for this ? Either Free or Paid.
Thanks
Awesomium is a fairly decent browser since it uses chrome as it's base and it's a native control for WPF so it'll respect your z-index. However, it's a wpf control right now and it's not clear if SL is easily supported or not, but this may help.
Awesomium website: http://awesomium.com/
some mention on how to get a silverlight dll to use:
http://support.awesomium.com/discussions/questions/119-using-awesomium-with-silverlight-40

WPF WebBrowser Control: What browser does it use?

Does the WPF WebBrowser control always use Internet Explorer or does it use the default web browser on the system ?
Regards,
MadSeb
One issue the Web Browser Control has that it’s perpetually stuck in IE 7
rendering mode by default. Even though IE 8 and now 9 have
significantly upgraded the IE rendering engine to be more CSS and HTML
compliant by default the Web Browser control will have none of it. IE
9 in particular – with its much improved CSS support and basic HTML 5
support is a big improvement and even though the IE control uses some
of IE’s internal rendering technology it’s still stuck in the old IE 7
rendering by default.
This applies whether you’re using the Web Browser control in a WPF
application, a WinForms app, a FoxPro or VB classic application using
the ActiveX control. Behind the scenes all these UI platforms use the
COM interfaces and so you’re stuck by those same rules.
See this:
Web Browser Control – Specifying the IE Version
http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version
Internet Explorer, though there are "hacks" posted on the internet which allow you to use a workaround in order to launch any browser you like.
This thread seems to explain one of the possible solutions.

Alternatives to WebBrowser control in WPF?

We are working on a WPF app with the web browser control. When the user drags the window, the web browser lags behind the window as it drags.
Does anyone know how to solve this issue? Failing that, does anyone know an alternative to the web browser control itself?
Thanks!
Yes, as long as you don't require IE specific features you can use Awesomium which basically gives the same browser engine used by Google Chrome except for everything is rendered in pure WPF. For a while it was open source but I believe it is becoming a commercial product.
I haven't heard about any Native WPF WebBrowser Control. The only options I know are based on Win32 controls which are wrapped into WPF controls in order to displayed. (See more details at http://msdn.microsoft.com/en-us/library/ms752055.aspx )
Recently I have to use the WPF wrapper for the WebBrowser control, and it's very limited regarding the options available for the developer. During my research I found that you are able to inject scripts or html content in order to modify the page behavior. Also, you can call .NET code (e.g. CSharp function from Javascript).
However tasks such as accessing the cache, modifying cookies are difficult task or changing the web browser behavior are very difficult. Here is when you will have to use DLL Imports in order to invoke unmanaged routines (see http://msdn.microsoft.com/en-us/library/aa984739(v=vs.71).aspx )
It's possible to look for an alternative WebBrowser control such as:
http://code.google.com/p/csexwb2/
http://wpfchromium.codeplex.com/
I hope this helps
You can try CefSharp.Wpf which uses Chromium as a base browser. You can find it on NuGet

Popup Outside the Bounds of the Silverlight Control

I'm simply wondering if it is possible to open one or more non-modal popups or dialogs, which are NOT limited to be displayed and moved within the bounds of the parent Silverlight control. Doesn't seem to be possible, even for out-of-browser installs. I hope I'm wrong :)
While the previous answers are true, strictly speaking it is possible in browser mode to have a real popup. At the moment it can only be done indirectly and with a lot more work than a normal Silverlight popup Window.
Basically you popup a new Silverlight app (or second instance of the current app) in a browser popup window (not a Silverlight popup). Silverlight can create the popup window via calls to Javascript.
The 2 Silverlight instances usually need to communicate data, but there are several solutions to that problem too. Javascript can also talk to Silverlight objects (love that feature) and pass information back or you could simply pass data one-way via URL parameters.
No this is not possible, Silverlight strictly renders to a single window (or if in Windowless mode the specific rectangle provided to it by its host).
As Anthony said this is not possible. I've heard from some of the people involved with Silverlight development that this is an often-requested feature and will most likely be added in an upcoming version. But I'm guessing it would only be available in "out of browser" mode.

Running a Silverlight Website

When using silverlight in a browser is there anyway to switch xaml pages? I'm also wondering how to go about using my encryption class I've wrote in c# to validate users in silverlight. Any help would be much appreciate!
If you're using Silverlight 3 Beta then what you're looking for is the Navigation system using the Frame and Page controls. There are lots of tutorials available online for this.
In Silverlight 2 the easiest solution is to replace the RootVisual with a Panel (like Grid or Canvas) and have your own code to switch the child elements (which are usually your own UserControls).
There's a good tutorial available at Flawless Code
We are using Jesse Liberty's method of doing the page switching in SL2. It is explained here. Jesse Liberty SL2 page switching
It also look or feels a lot like how SL3 does it with the Navigation mentioned above.
Caution: If you do this, the back button on the browser will need to be handled - users will exit out of your SL2 app when hitting the back button. SL3 has built in support for handling and responding correctly to the back button.

Resources