The steps:
- Created a web part page document library
- Uploaded DiggSample.xap into the library
- Create a new web part page in the library
- Added a content editor web part to the page.
- Added an object tag pointing to the XAP file in the source code of the content editor web part
And, voila.... nothing displayed! Played with adding the Silverlight.js file to the library, and various other techniques. Finally found the key was the interaction of the object tag width and height with the rendered dimensions of the web part.
Solved by either:
- Setting a fixed height and width in the web part appearance properties, and giving the object tag a height and width of 100%, OR
- Setting an absolute height and width for the object tag and leaving the web part with non-fixed height and width
The former approaches works better as the latter approaches results in the Silverlight element's UI not matching the web part's width.
The content of the object tag is as shown below:
1 comment:
This is really a helpful post. I was facing the problem to display silverlight in a content editor web part. This post solves my problem.
Thank you so much.
Post a Comment