# GraffitiNote
Class Inherits GraffitiUIControl
## About
GraffitiNote is a simple yet effective class used to display information via the user interface that should draw a user’s attention. With four different pre-built note types ranging from “Information” to “Error”, and a custom type where custom colors can be applied by the developer, GraffitiNote is very versatile.
The class also supports variable height based on content, and compact or extended modes.
## Preview
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| False | True |
### Console
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
### iOS
| 32-Bit | 64-Bit |
| :---: | :---: |
| False | True |
### Web
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Types | Information <br> Success <br> Warning <br> Error | Supported note appearance types. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ButtonPressed | (None) | (None) | Fired when the user presses the button within the note. |
| CloseButtonPressed | (None) | (None) | Fires when the user presses the close button. |
| HeightChanged | (None) | (None) | If the AutoHeight property is set to true, this event will fire when the height has changed to fit the contents. |
| LongPressed | (None) | (None) | Raised when the user has long-pressed the control. |
| Pressed | (None) | (None) | Raise when the user presses on the area of the note not occupied by the button or close button. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| AutoHeight | Boolean | Nil | If True, the control will resize to fit the contents. |
| BackgroundColor | ColorGroup | Nil | Color used to draw the background when Type is set to NoteTypes.Custom |
| BorderColor | ColorGroup | Nil | Color used to draw the note border. |
| BorderRadius | Integer | Nil | Width and height of corner rounding. Should be no greater than Min( width, height) - 1 |
| BorderSize | Integer | Nil | Size of the border drawn around the outter edge of the control, color is taken from BarColor. |
| ButtonBackgroundColor | ColorGroup | Nil | ColorGroup applied to the background of the button. |
| ButtonBackgroundColorPressed | ColorGroup | Nil | ColorGroup applied to the background of the button when it is in the pressed state. |
| ButtonBorderColor | ColorGroup | Nil | ColorGroup applied to the border of the button. |
| ButtonBorderColorPressed | ColorGroup | Nil | ColorGroup applied to the border of the button when it is in the pressed state. |
| ButtonFontName | String | Nil | Name of the font to attempt to use for the button's text. |
| ButtonFontSize | Double | Nil | Font size to attempt to apply to the button's text. |
| ButtonFontStyle | GraffitiUIControl.FontStyles | Nil | Determines the style applied to the button's text. |
| ButtonText | String | Nil | Caption drawn within the button. |
| ButtonTextColor | ColorGroup | Nil | Color applied to the button's text. |
| ButtonTextColorPressed | ColorGroup | Nil | ColorGroup applied to the button's text when it is in the pressed state. |
| CloseButtonBackgroundColor | ColorGroup | Nil | ColorGroup applied to the close button's background. |
| CloseButtonBackgroundColorPressed | ColorGroup | Nil | ColorGroup applied to the close button's background when it is in the pressed state. |
| CloseButtonBorderColor | ColorGroup | Nil | ColorGroup applied to the close button's border. |
| CloseButtonBorderColorPressed | ColorGroup | Nil | ColorGroup applied to the close button's border when it is in the pressed state. |
| CloseButtonIconColor | ColorGroup | Nil | ColorGroup applied to the close button's "X" icon. |
| CloseButtonIconColorPressed | ColorGroup | Nil | ColorGroup applied to the close button's "X" icon when it is in the pressed state. |
| ContentFontName | String | Nil | The font used in drawing the Content. |
| ContentFontSize | Integer | Nil | Size applied to the font for drawing Content. |
| ContentFontStyle | GraffitiUIControl.FontStyles | Nil | Style applied to the content. |
| ContentText | String | Nil | Content of the note. |
| ContentTextColor | ColorGroup | Nil | ColorGroup applied to the content text. |
| HasCloseButton | Boolean | Nil | When True, a close button will be drawn in the top-right corner of the component. |
| ParentView | MobileScreen | Nil | The parent screen of the control. This must be set for AutoHeight to function. |
| ShadowIntensity | Double | Nil | Value between 0 and 1 determining how strong the background shadow should be. |
| TitleFontName | String | Nil | Font applied to the note's title. |
| TitleFontSize | Integer | Nil | Font size of Title. |
| TitleFontStyle | GraffitiUIControl.FontStyles | Nil | Style applied to the title. |
| TitleText | String | Nil | Text drawn as the title of the note. |
| TitleTextColor | ColorGroup | Nil | Color used to draw the title text. |
| Type | GraffitiNote.Types | Nil | The drawing style of the note. |