Exemplo n.º 1
0
        public TagEntryView()
        {
            PropertyChanged  += TagEntryViewPropertyChanged;
            PropertyChanging += TagEntryViewPropertyChanging;

            TagEntry              = new TagEntry();
            TagEntry.TextChanged += TagEntryTextChanged;
            Children.Add(TagEntry);
        }
        public TagEntryView()
        {
            PropertyChanged  += TagEntryViewPropertyChanged;
            PropertyChanging += TagEntryViewPropertyChanging;

            TagEntry              = new TagEntry();
            TagEntry.TextChanged += TagEntryTextChanged;
            TagEntry.Completed   += TagEntryCompleted;;
            TagEntry.IsVisible    = ShowEntryBox;
            Children.Add(TagEntry);
        }
        void AddTag(string tag, TagEntry tagEntry)
        {
            var tagBindingContext = TagValidatorFactory(tag);

            if (tagBindingContext != null)
            {
                TagItems.Add(tagBindingContext);
                tagEntry.Text = string.Empty;
            }
            else
            {
                tagEntry.Text = tag;
            }

            tagEntry.Focus();
        }