This is a mirror of official site: http://jasper-net.blogspot.com/

FloatingWindow - Multi-windows Interface for Silverlight 4

| Tuesday, October 26, 2010
windows.png

Windows vs Pages

I see a tendency of some Silverlight applications to mimic traditional HTML-based web sites. That's not so bad if we talk about home pages, but surprising if we have to deal with RIA - Rich Internet Applications. Apparently, besides inertia in thinking there are some technical reasons for that. And the most evident one - complexity of the RIA.

Facing a need to design a web system with rich user interface, we shall make a choice between a page-by-page scenario (so familiar to web developers) and more habitual to end users desktop-like interface. The last one sets up tough claims to developers: functional designers and system analysts shall be able to design complex and usable front-end, architects - to elaborate interaction between all parts of the system, testers - hardly will be happy as well.

On the other part, Silverlight provides great features for building such complex systems. Any attempts to make them with ASP/Ajax/JavaScript/jQuery shortly turn into a nightmare. The only one feature richly deserving of more developers' efforts is multi-windows interface. You can easily find commercial packages, providing components for building such interfaces. But if you don't want to pay - take it for free :)

Windows in 21 Days

Indeed it required a bit more time to write this library. I took Tim Heuer's FloatableWindow and the ChildWindow included into the Silverlight 4 Toolkit. Finally, only a few original methods had left after my rework. I added the following functionality:

Window can be resized by dragging any edge or a corner
Added possibility to snap in moving or resizing window to the nearest window's boundary
Window can be minimized, maximized and restore its position and size
Added a task bar, displaying minimized or all windows
The task bar can display a snapshot of a minimized window or an icon - a FrameworkElement attached to the window.
How It Works

Really I don't want to explain how it works - you have my source code. I'd better describe how it can be used. But before we start, I'll introduce some terms and properties used in the library. The picture below will help me to illustrate them

Read more: Codeproject

Posted via email from .NET Info

0 comments: