Silverlight2 Lightbox 演示教程,一步一步教程会你如何正确使用Silverlight2 Lightbox的配置,并附带Siliverligh2 Lightbox示例源码下载.
Introduction
TeamLive (the project I have been working on recently) blends Asp.net, Ajax and Silverlight in a number of places and I was interested to see how far I could push the html/Silverlight blend - the lightbox seemed like a good component for my experiment.
For those of you wondering, a Lightbox is an effect that fades the page in the background to show you new content in the foreground.
This article isn't intended to be a Silverlight tutorial, if you are new to this technology then I recommend reading some of the beginners tutorials before using this code.
Background
TeamLive blends Asp.net, Ajax and Silverlight in a number of places. E.g. during a multi-file upload we adjust the OBJECT's styles giving it more screen space for displaying the progress bars.
One of the controls I have been working on for the next iteration of TeamLive is a lightbox to help users navigate their image grids.
Some of the requirements for the lightbox:
- Only load the big image if needed (duh!)
- Small xap (the js lightboxes we've used in the past have required a lot of js and/or associated images) - this xap is only 8K
- Only one Silverlight lightbox object per page (we didn't want lots of objects being created)
- Simple to use (drop a xap on a page and call some js)
- Degrade cleanly when Silverlight 2 is not present
