예제 #1
0
        protected virtual void Setup()
        {
            this.Tokens     = new List <TIToken>();
            this.Editable   = true;
            _maxTokenWidth  = 200;
            _tokenTintColor = TIToken.BlueTintColor;
            this.RemovesTokensOnEndEditing = true;
            this.TokenizingCharacters      = new char[] { ',' };

            this.BorderStyle            = UITextBorderStyle.None;
            _fontSize                   = 14;
            this.Font                   = UIFont.SystemFontOfSize(this.FontSize);
            this.BackgroundColor        = UIColor.White;
            this.AutocorrectionType     = UITextAutocorrectionType.No;
            this.AutocapitalizationType = UITextAutocapitalizationType.None;
            this.VerticalAlignment      = UIControlContentVerticalAlignment.Top;

            this.EditingChanged  += Self_EditingChanged;
            this.EditingDidBegin += Self_DidBeginEditing;
            this.EditingDidEnd   += Self_EditingDidEnd;

            this.Layer.ShadowColor   = UIColor.Black.CGColor;
            this.Layer.ShadowOpacity = 0.6f;
            this.Layer.ShadowRadius  = 12;

            this.PromptText = "To:";
            this.Text       = kTextEmpty;

            _internalDelegate            = new TITokenFieldInternalDelegate(this);
            _internalDelegate.TokenField = this;

            base.WeakDelegate = _internalDelegate;

            _hasSetup  = true;       // init workaround
            this.Frame = this.Frame; // init workaround
        }
예제 #2
0
        protected virtual void Setup()
        {
            this.Tokens = new List<TIToken>();
            this.Editable = true;
            _maxTokenWidth = 200;
            _tokenTintColor = TIToken.BlueTintColor;
            _tokenRadius = 10;
            this.RemovesTokensOnEndEditing = true;
            this.TokenizingCharacters = new char[]{','};

            this.BorderStyle = UITextBorderStyle.None;
            _fontSize = 14;
            this.Font = UIFont.SystemFontOfSize(this.FontSize);
            this.BackgroundColor = UIColor.White;
            this.AutocorrectionType = UITextAutocorrectionType.No;
            this.AutocapitalizationType = UITextAutocapitalizationType.None;
            this.VerticalAlignment = UIControlContentVerticalAlignment.Top;

            this.EditingChanged += Self_EditingChanged;
            this.EditingDidBegin += Self_DidBeginEditing;
            this.EditingDidEnd += Self_EditingDidEnd;

            this.Layer.ShadowColor = UIColor.Black.CGColor;
            this.Layer.ShadowOpacity = 0.6f;
            this.Layer.ShadowRadius = 12;

            this.PromptText = "To:";
            this.Text = kTextEmpty;

            _internalDelegate = new TITokenFieldInternalDelegate(this);
            _internalDelegate.TokenField = this;

            base.WeakDelegate = _internalDelegate;

            _hasSetup = true;// init workaround
            this.Frame = this.Frame;// init workaround
        }
예제 #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_internalDelegate != null)
                {
                    _internalDelegate.Dispose();
                    _internalDelegate = null;
                }
                if (_placeHolderLabel != null)
                {
                    _placeHolderLabel.Dispose();
                    _placeHolderLabel = null;
                }

            }
            base.Dispose(disposing);
        }