Home » Silverlight

IE compatibility mode changes plugin dimensions

I just noticed that when compatibility mode is turned off in IE the Silverlight plugin does not return accurate ActualWidth or ActualHeight properly.

For example: If you have a plugin set to 100% and a background image set to Stretch="Fill". Thats fine until you resize the browser to something larger than the original size. At that point the plugin does not reset it's Actual width and height properties and anything set to Stretch="Fill" does not resize to the new dimensions. This is also true with the default settings in Chrome, Safari, Firefox

With compatibility mode turned ON the dimensions are correct and an Element set to Fill works correctly, and it also worked fine in all browsers with Silverlight 3.

1) how do we determine when the compatibility is ON or OFF?

2) How do we force the plugin to update it's height and width when the Browser resizes? Currently, Version4 of the Plugin reports the original ActualWidth and Height at all times once the plugin has been created.

3) Is there an Init parameter for the SL4 plugin to force a reset of the dimension properties and cascade that down to all the UI Elements with those dependencies.

To be clear, the Plugin resizes to 100% of the browser window on a resize like it should. It just does not trickle that down to it's own properties.

<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure