Beispiel #1
0
 public static void Init(MessageBarStyleSheet customStyle = null)
 {
     ToastNotificatorImplementation.customStyle = customStyle ?? new MessageBarStyleSheet();
 }
        /// <summary>
        /// Shows the message
        /// </summary>
        /// <param name="title">Messagebar title</param>
        /// <param name="description">Messagebar description</param>
        /// <param name="type">Message type</param>
        /// <param name = "onDismiss">OnDismiss callback</param>
        /// <param name="duration"></param>
        /// <param name="styleSheet"></param>
        public void ShowMessage(string title, string description, ToastNotificationType type, Action <bool> onDismiss, TimeSpan duration, MessageBarStyleSheet styleSheet = null)
        {
            var messageView = new MessageView(title, description, type, onDismiss, duration)
            {
                stylesheetProvider = styleSheet,
                Hidden             = true
            };

            messageWindowView.AddSubview(messageView);
            messageWindowView.BringSubviewToFront(messageView);

            messageBarQueue.Enqueue(messageView);

            if (!messageVisible)
            {
                showNextMessage();
            }
        }