SharePoint's Silverlight webpart defaults to WindowlessMode

Because SharePoint’s Silverlight webpart defaults to windowless=“true”, there are some features of Silverlight that won’t work as you’d expect out of the box.

  • Drag and drop events
  • Transparency
  • Overlay DIV

By default, it renders something like this:

Luckily, the SharePoint team provides an easy property to override this value.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.silverlightwebpart.windowlessmode.aspx

When packaging your Silverlight .webpart file, configure the XML to set the WindowlessMode property to false.

                  Cannot import this Web Part.                       Silverlight Metro UI Web Part         Metro UI.         ~sitecollection/Style Library/Metro.Demo.xap         800        false            

Then the rendered HTML will have the value set appropriately, and Silverlight drag and drop events will work happily again, in SharePoint.

Discussions