This project is read-only.
Project Description
A modal control for WPF that uses different animations to present a given control and lock out the rest of the application.

This control allows a given control to be presented to the user while locking out the rest of the WPF application (basically, a modal control).

The name "ScalingModal" comes from the original scaling animation that was used with the control. Since then, many other animations have been added.

The ScalingModal can be initialized with a reference to a Panel that will be disabled when the modal is expanded. The Panel should usually be wrapped around as much of the WPF application as possible so tabbing, controls, etc. will be prevented from being accessed by the user when the modal is expanded.

As far as using it, the ScalingModal is a singleton that just needs to be initialized at startup by passing in its parent control along with the optional Panelto be disabled as specified above. Then, whenever it needs to be expanded, you just call the static Instance's Expand() method and pass in the control you want to be presented. To collapse the modal, you just call the Instance's Collapse() method. Specific animations can be used per use by an optional parameter on the Expand() and Collapse() methods, or specified globally by setting the Instance's Animation property (the default is to use a random animation).

For examples of this control in action (at least the Silverlight 3 version, which should act similarly), see the following pages:
    • Picture pages use the scaling modal control when presenting the full-size version of a picture.

Last edited Feb 16, 2012 at 11:54 PM by hiryu, version 5