I have a MOSS 2007 publishing site which incorporates some Silverlight components on various pages. Beyond a few areas the rest of the site is SharePoint and ASPX (i.e. standard HTML/javascript).
I'm looking at incorporating a dynamic/dropdown menu to the main navigation. Unfortunately on a few of the pages the menu sits close to a Silverlight area and, when a menu is pulled down it falls "behind" the Silverlight block.
Is there something simple I'm not doing or is there a limitation that Silverlight always be on top of dynamic content displayed via the rest of the HTML DOM?
Any ideas?
-Kevin
In order for Silverlight to appear behind other HTML elements the silverlight plugin needs to run in windowless mode. You can configure that using a param on the object tag.
<param name="windowless" value="true" />
Note that is can degrade performance and is not recommended if you are displaying video or making heavy use of complex animations.
have you tried the CSS property: z-index?
Related
i have a flex project that runs in using flash player 11. What i am trying to achive is to have a tab of my project which, when loaded displays a web page within the tab. I do not want to naviagate away from my project but display it within my tab layout. Is this possible? i have found plenty of info on how to do this using air but nothing with regards to my flex project not using air.
thanks
No, this isn't directly possible. The HTML and StageWebView components would do the trick, but they're AIR-only.
What you can do is call a javascript function using ExternalInterface to load your desired web page in an iframe positioned above your Flex area.
See Div above iframe with flash content for more info on putting an iframe above your flash content area.
if you have to do, try to use flex-iframe, but is not a good way to use iframe in flex, it will have many mask problems.
I'm working with a DirectShow application that exports as a Firefox plugin for video streaming.
To the best of my knowledge, it seems as though the plugin is being rendered on a separate window from the web page. I'd like to edit the application to allow html elements over the plugin much like flash allows with wmode='opaque' or 'transparent'. Another option that would work is to pass mouse events through the application (such as mouse move and mouse down).
I've been reading up on put_MessageDrain and put_Owner, but I'm not sure how to apply these to the application or if they will work.
I'm also aware that iframe shimming may work, but since I have access to the source code of the application I'd like to add the functionality directly rather than use a work around. Is iframe shimming my best option? It seems like the easiest option.
The application currently uses Windowless mode and is always on top of everything else on the web page.
The way video is displayed with DirectShow video renderers, you cannot make it transparent without providing your own video renderer filter, or custom allocator/presenter object for one of the standard video renderers. DirectShow renderers display video with DirectDraw or Direct3D surface which stands alone from hosting window and is not interacting with host in a way supposed to get you combined picture with transparent video and something else as well.
I've been reading up on put_MessageDrain and put_Owner
These are for Windowed mode, you seem to use Windowless which assumes that you are providing a hosting window and rectangle to cover opaquely. Renderless, the third mode VMR-7/9 and EVR offer you is the one where you provide allocator/presenter and override the presentation.
Windows SDK (for some you might need to look for an older version, not the latest) provides with samples: Renderless, VMR9Allocator, EVRPresenter which demo the renderless mode.
We are building a Windows 8 app and we'd like to support the snapped view. Some of our content is loaded from 3rd party HTML pages where we embed a WebView in the XAML. Everything loads fine, but we'd like to take advantage of HTML5/CSS3 to detect dimensions and choose the appropriate CSS to render the page.
So our WebView looks something like this:
<WebView x:Name="_WebView"
Source="{Binding NavigationUri, Mode=OneWay}"
Width="275"
Height="200" />
This is just an example, but how can the HTML page know that the size of the window is 275px by 200px?
[Edited for better approach]
You could inject some Javascript from the C# side. See this MSDN thread for an example. Since you know the width of the control in your C# code, you can then easily set some variable or invoke a function.
I am quite new to silverlight and I am seeking advise on embedding external html pages inside silverlight applications.
Can the contents of an external html page be integrated inside a silverlight application ?
How about features like SVG support or Socket.IO which exist in modern browsers ? If the external page is using HTML5 features, can silverlight render/process it correctly ?
Thanks,
There is no native support for rendering HTML pages in Silverlight. You can however access and manipulate DOM elements from within Silverlight. This allows you to place HTML elemnts on top of a silverlight application and by appropriately adjusting the size and position of these elements you can create the illusion of embedded HTML in simple applications.
Why does WPF lack HTML support? I know there is the Frame. But that shouldn't even be considered a WPF control (not, at least, when it is rendering HTML). I know there is a hack with a floating window, but that's crap!
I just want to show a static HTML document in my WPF application, in a window with rounded corners and a drop shadow. I'm hitting a brick wall, and I'm incredibly frustrated!
HELP!
Can you just embed a web browser control in your WPF app? Your WPF app can then have the nice looking drop shadow around the WebBrowser control, and then WebBrowser control can host your static HTML.
http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/web-browser-control-in-wpf/
you're pretty limited with the functionality built in to WPF. WPF doesn't know how to render HTML on its own - it relies on the native Internet Explorer web browser activex control (aka Trident) to do this. activex controls are rendered in "child windows" on top of any other content in your wpf window. nothing you can really do about this.
the best alternative is probably to switch to a Google Chrome-based control which does not have such a limitation: http://wpfchromium4.codeplex.com/