public TestEditableAnswerViewCell()
        {
            var answerEntry = new Entry {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BackgroundColor   = Color.FromHex(Theme.Current.TestPassingEntryColor),
                TextColor         = Color.FromHex(Theme.Current.TestPassingAnswerColor),
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                Style             = AppStyles.GetEntryStyle()
            };

            answerEntry.SetBinding(Entry.TextProperty, "ContentToAnswer");

            View = new Frame {
                BackgroundColor = Color.FromHex(Theme.Current.BaseBlockColor),
                HasShadow       = false,
                Margin          = _frameMargin,
                CornerRadius    = _frameRadius,
                Content         = new StackLayout {
                    Orientation = StackOrientation.Horizontal,
                    Children    =
                    {
                        answerEntry
                    }
                }
            };
        }
Esempio n. 2
0
        Style getEntryStyle()
        {
            var style = AppStyles.GetEntryStyle();

            style.Setters.Add(new Setter {
                Property = HeightRequestProperty,
                Value    = _controlHeight
            });

            style.Setters.Add(new Setter {
                Property = BackgroundColorProperty,
                Value    = Theme.Current.LoginEntryBackgroundColor
            });

            return(style);
        }