# GraffitiModalInstance
Class Inherits GraffitiSuite.BaseCanvas
## About
This class is the visual representation of the backdrop for GraffitiModalContainers and provides additional functionality to the GraffitiModal controller.
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Attributes
| Name | Value |
| --- | --- |
| HideFromLibrary | |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| AnimationStyles | Fade <br > SlideUp <br > SlideDown <br > SlideLeft <br > SlideRight <br > Grow <br > Reveal <br > RollHorizontal <br > RollVertical <br > WindowShade <br > Doors <br > None | Support opening and closing animation styles. |
| Placements | LeftTop <br > LeftMiddle <br > LeftBottom <br > CenterTop <br > CenterMiddle <br > CenterBottom <br > RightTop <br > RightMiddle <br > RightBottom | Supported positions within the parent window. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DataAvailable | data as Dictionary | (None) | Raised when calling the Action method from within a GraffitiModalContainer. |
| Hidden | (None) | (None) | Raised when a modal instance has been hidden. |
| Paint | g as Graphics <br> areas() as Rect | (None) | Raised after all other drawing is complete. Can be used to customize appearance. |
| Shown | (None) | (None) | Raised when a modal instance has been shown. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Constructor | name as String <br> container as GraffitiModalContainer | (None) | Creates a new instance of the class with the specified properties. |
| Hide | (None) | (None) | Hide the previously shown modal. |
| Resize | redraw as Boolean = True | (None) | Forces a resize and redraw to match changed parent dimensions. |
| Show | (None) | (None) | Show the modal within its parent DesktopWindow. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AnimationEasing | GraffitiAnimator.Easings | (None) | Easing operation used to control animation progression. |
| AnimationLength | Integer | 750 | Length of in/out animation. |
| AnimationStyle | AnimationStyles | (None) | Style of animation, IE: Fade, Roll, Slide, Reveal. |
| BackgroundColor | ColorGroup | (None) | Color used to draw the background area of the Container within the UI. Leave Nil for automatic handling. |
| BorderRadius | Integer | 0 | Border radius drawn on the container. |
| Container | GraffitiModalContainer | (None) | The content container that is animated and displayed. Must be instantiated with New, but not added to a view. |
| DismissOnPress | Boolean | False | Dismiss modal when the transparent backdrop is clicked. |
| OverlayColor | ColorGroup | (None) | Color overlaid on the background to simulate dimming of the window's contents. |
| Placement | Placements | Placements.CenterMiddle | Position of the modal instance within the parent window. |
| PlacementBoundaryMargin | Integer | 10 | Determines distance from the window's edge when using an outside placement. |
| Tag | Variant | (None) | Developer storage. |