SaaToast
Last updated
Last updated
SaaToast is a Notification, Toast, Alert, MessageBox.... should I continue ;) ? I mean it is everything. Only your ability to redesign it, is the limit.
The below illustrations show three main ways SaaToast works by default. These are the designs I put by default. You can change and make it to your needs.
SaaToast has Visual Designer. This means you can design the toast visually in your visual studio.
SaaToast is made up of these parts:
1. Container 2. Body 3. Head 4. Close 5. Icon 6. Loader
see the illustration below:
This is the main frame of the toast.
BackColor
and BackColor2
are the two colors that form the background color of the toast. They can be adjusted with BackColorAngle
.
AutoSize
tells whether the toast will resize itself to fit its contents. If you turn this on then the Size
is ignored. You can still adjust it with OffHeight
and OffWidth
.
MinSize
tells the minimum size the toast will accept.
Size
tells the height and the width of the toast.
OffHeight
tells the extra height to be added to the height of the toast when AutoSize
is on. Since when AutoSize
is on, Size
is ignored, you can use OffHeight
to add some height to the toast.
OffWidth
tells the extra width to be added to the width of the toast when AutoSize
is on. Since when AutoSize
is on, Size
is ignored, you can use OffWidth
to add some width to the toast.
Padding
tells the distance between edges of the toast and its contents.
Position
tells the predefined position of the toast. It can be TopRight
, TopLeft
, BottomRight
, BottomLeft
or Center
of the Screen/Form. This will be the initial position of the toast where its offsets will be calculated from. I mean it will be the base position of the toast at which its X and Y will be recognized as 0.
Movable
tells whether the toast is movable. If you turn on then the user can move the toast with the mouse.
OffSetX
tells how far the toast will be moved from the edge of the screen/form. I think you have seen most of SaaUI controls OffSetX
counts from left to right side but for the SaaToast it counts from the edge of the screen/form depending on the Position except when the toast Position
property is set to Center
. This time it counts from left to right. See the illustration below. Arrow points where OffSetX
will move the toast depending on the Position.
OffSetY
tells how far the toast will be moved from the edge of the screen/form. I think you have seen most of SaaUI controls OffSetY
counts from top to bottom side but for the SaaToast it counts from the edge of the screen/form depending on the Position
except when the toast Position
property is set to Center
. This time it counts from top to bottom. See the illustration below. Arrow points where OffSetY
will move the toast depending on the Position
.
Radius
property tells the roundness of the edges. With this property you can change the shapes of the border edges. Radius
has four properties:
TopLeft
, TopRight
, BottomRight
, BottomLeft
.
AutoClose
tells if the toast will close itself when the loader ends (even if the loader is hidden).
ClosePreviousToast
tells whether all other toasts owned by the current application is dismissed whenever a new toast is created by this toast instance.
BodyBackColor
tells the background color of the body.
BodyTextColor
tells the forecolor of the body (Text).
BodyPadding
tells the distance between the body edges and its contents.
Text
tells the text to be displayed in the body.
BodyTextFont
tells font for the Text displayed in the body.
ShowBody
tells whether the body is shown.
HeaderBackColor
and headerBackColor2
are the two colors that form the background color of the toast Head. They can be adjusted with HeaderBackColorAngle
.
TitleBackColor
tells the background color for the title.
TitleTextColor
tells the forecolor of the title.
HeaderPadding
tells the distance between the Header edges and its contents.
TitlePadding
tells the distance between the title edges and its contents.
TitleText
tells the text to be displayed in the title.
TitleTextFont
tells font for the Text displayed in the title.
ShowHeader
tells whether the header is shown. If header is hidden then both title and close button is hidden too.
ShowTitle
tells whether the title is shown.
CloseBackColor
tells the background color of the close button.
CloseActiveImage
tells the image of the close button when mouse pointer is over it.
CloseInActiveImage
tells the image of the close button when mouse pointer leaves.
CloseImageSizeMode
tells the sizing mode of CloseActiveImage
and CloseInActiveImage
.
ClosePadding
tells the distance between the close edges and its contents.
ClosePosition
tells where the close button is placed in the header. By default it is Right
.
ShowClose
tells whether the close button is shown.
Icon
tells the image to be displayed.
IconImageSizeMode
tells the sizing mode of the Icon Image.
IconPadding
tells the distance between the Icon edges and its contents.
IconPosition
tells where the Icon is placed in the toast. By default it is Left.
ShowBodyIcon
tells whether the Icon is shown.
LoaderBackColor
tells the background color of the loader.
LoaderHeight
tells the height or the thickness of the loader
LoaderPosition
tells the position of the loader. Default it is Left
.
IntervalInMilliseconds
tells the interval in milliseconds between increments of the loader.
StopOnHover
tells whether to loader pauses when mouse pointer is over it.
LoaderVisible
tells whether the loader is visible.
Close()
closes last toast created by this toast instance.
CloseAnyAll()
closes all toasts owned by this application.
Show()
displays the toast on the screen in the defined position(toast1.Position = TopRight/TopLeft/BottomRight/BottomLeft) respecting OffSetX
and OffSetY
.
Show(Form)
displays the toast on the defined form in the defined position(toast1.Position = TopRight/TopLeft/BottomRight/BottomLeft) respecting OffSetX
and OffSetY
.
Show(Point)
displays the toast in the defined points on the screen. This doesn't respect OffSetX
and OffSetY
.
Closed
fires when a toast is closed. The reason can be; the user has closed it, the loader has finished(if AutoClose
is true), you have closed it with Close()
or CloseAnyAll()
or it has been closed by another toast(if that toast has ClosePreviousToast
set true).