Exemplo n.º 1
0
        private static string GetPositionCss(ToastEnums.ToastDisplayPosition toastDisplayPosition = ToastEnums.ToastDisplayPosition.BottomLeft)
        {
            switch (toastDisplayPosition)
            {
                case ToastEnums.ToastDisplayPosition.TopRight:
                    return "toast-top-right";
                case ToastEnums.ToastDisplayPosition.BottomRight:
                    return "toast-bottom-right";
                case ToastEnums.ToastDisplayPosition.BottomLeft:
                    return "toast-bottom-left";
                case ToastEnums.ToastDisplayPosition.TopLeft:
                    return "toast-top-left";
                case ToastEnums.ToastDisplayPosition.TopFullWidth:
                    return "toast-top-full-width";
                case ToastEnums.ToastDisplayPosition.BottomFullWidth:
                    return "toast-bottom-full-width";
                case ToastEnums.ToastDisplayPosition.TopCenter:
                    return "toast-top-center";
                case ToastEnums.ToastDisplayPosition.BottomCenter:
                    return "toast-bottom-center";
                default:
                    return "toast-bottom-left";




            }


        }
Exemplo n.º 2
0
        public void AddToastMessage(string title, string message, ToastEnums.ToastType notificationType)
        {
            var toastMessage = new ToastMessage()
            {
                Title = title,
                Message = message,
                ToastType = notificationType
            };

            ToastMessages.Add(toastMessage);

        }
 public void ShowToastNotification(string message, ToastEnums.ToastType type, string title = "")
 {
     ToastNotification.AddToastMessage(title, message, type);
 }