/// <summary>
        /// Rebuilds the recipients list.
        /// </summary>
        public void DeleteMissingVisualLabels()
        {
            if (Message == null) return;

            var simpleLabels = new List<LabelsContainer>();
            var walker = new DocumentWalker();

            walker.VisualVisited += delegate(object sender, object visitedObject, bool start)
                {
                    if (visitedObject is ContentControl)
                    {
                        var contentControl = (ContentControl)visitedObject;

                        if (contentControl.Content is LabelsContainer)
                            simpleLabels.Add((LabelsContainer)contentControl.Content);
                    }
                };

            walker.Walk(Editor.Document);

            // Check if there are any labels that need to be removed
            var remove = (from label in Message.LabelsList
                          where !simpleLabels.Any(l => l.Labelname == label.Labelname)
                          select label).ToList();

            foreach (var label in remove)
                Message.RemoveLabel(label, true);

            Editor.ShowWatermark = Message.LabelsList.Count == 0;
        }
        public List<LabelsContainer> GetVisualLabels()
        {
            var walker = new DocumentWalker();
            var labels = new List<LabelsContainer>();

            walker.VisualVisited += delegate(object sender, object visitedObject, bool start)
            {
                if (visitedObject is ContentControl)
                {
                    var contentControl = (ContentControl)visitedObject;

                    if (contentControl.Content is LabelsContainer)
                        labels.Add((LabelsContainer) contentControl.Content);
                }
            };

            walker.Walk(Editor.Document);

            return labels;
        }
        /// <summary>
        /// Rebuilds the recipients list.
        /// </summary>
        void RebuildRecipientsList()
        {
            SuppressListForCurrentWord = false;

            recipients.Clear();

            DocumentWalker walker = new DocumentWalker();
            walker.VisualVisited += delegate(object sender, object visitedObject, bool start)
            {
                if (visitedObject is ContentControl)
                {
                    ContentControl contentControl = (ContentControl)visitedObject;
                    object content = contentControl.Content;

                    if (content is SourceAddress)
                        recipients.Add(content as SourceAddress);

                    if (content is Profile)
                    {
                        var profile = (content as Profile);
                        var address = profile.SourceAddress;

                        address.SetChannel(profile.SourceChannel);

                        recipients.Add(address);
                    }
                }
            };
            walker.Walk(Editor.Document);
        }