Reputation: 233
Is it possible through some client-side scripting to hide the control bar in a Silverlight web player?
If so, how?
This is the SLplayer I'm using: http://jsfiddle.net/W5h6g/
I've tried placing autohide=true in the "initparams" value, but that didn't work.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#silverlight {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<object id="silverlight" data="data:application/x-silverlight-2," type="application/x-silverlight-2">
<param name="source" value="http://clubace.dk/bb.xap">
<param name="onError" value="onSilverlightError">
<param name="background" value="white">
<param name="minRuntimeVersion" value="4.0.50401.0">
<param name="autoUpgrade" value="true">
<param name="windowless" value="false">
<param name="InitParams" value="mediaurl=http://level3-live-smooth.cmore.se/live/1270108.isml/manifest">
</object>
</body>
</html>
EDIT: Question title changed and image added to clarify issue.
Upvotes: 0
Views: 346
Reputation: 45652
You can communicate to the Silverlight app from JavaScript, assuming you can change the source code for the Silverlight. So basically call a method inside Silverlight, from JavaScript and let the method (inside Silverlight) handle the removing of user control.
If you just want to remove the whole Silverlight object, you can simply hide/remove the div/object that holds the Silverlight content from JavaScript.
Calling managed code (Silverlight) from JavaScript.
Upvotes: 1
Reputation: 51
Do you need to remove some user controls of your SL app from outside of it?
Upvotes: 0