コード例 #1
0
ファイル: QueryView.cs プロジェクト: DavenEdhel/BookShelf
        private void Initialize()
        {
            UserInteractionEnabled = true;

            _input      = new UITextView();
            _input.Font = UIFont.BoldSystemFontOfSize(20);
            _input.AutocapitalizationType = UITextAutocapitalizationType.None;
            _input.Text = _query.Title;
            Add(_input);

            Layout = () =>
            {
                _input.ChangeSize(Frame.Width, Frame.Height);
                _input.ChangePosition(0, 0);
            };

            Layout();

            AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                if (ShouldBecomeFirstResponderOnClick)
                {
                    _input.BecomeFirstResponder();
                }

                Clicked();
            }));
        }