Exemplo n.º 1
0
 void IMessageBubbleHelper.SetContent(MessageBubbleContent content)
 {
     if (content != null)
     {
         if (this.messageBubble == null || !this.messageBubble.IsOpen)
         {
             this.messageBubble = new MessageBubble(this.target, content);
             this.messageBubble.Initialize();
             this.messageBubble.IsOpen = true;
         }
         else
         {
             if (!(this.messageBubble.Content.Message != content.Message) && this.messageBubble.Content.MessageBubbleType == content.MessageBubbleType)
             {
                 return;
             }
             this.messageBubble.IsOpen = false;
             this.messageBubble        = new MessageBubble(this.target, content);
             this.messageBubble.Initialize();
             this.messageBubble.IsOpen = true;
         }
     }
     else
     {
         if (this.messageBubble == null)
         {
             return;
         }
         this.messageBubble.IsOpen = false;
     }
 }
Exemplo n.º 2
0
        public bool Validate()
        {
            string message = this.validatorMethod(this.validatedMethod());
            MessageBubbleContent content = (MessageBubbleContent)null;

            if (!string.IsNullOrEmpty(message))
            {
                content = new MessageBubbleContent(message, MessageBubbleType.Error);
            }
            this.helper.SetContent(content);
            return(content == null);
        }
Exemplo n.º 3
0
 public MessageBubble(UIElement placementTarget, MessageBubbleContent content)
 {
     this.placementTarget = placementTarget;
     this.content         = content;
 }