Exemplo n.º 1
0
        private void UpdateDescriptionFont()
        {
            if (DescriptionLabel is null)
            {
                return;                 // for HotReload
            }
            string         family = CellBase.DescriptionFontFamily ?? CellParent.CellDescriptionFontFamily;
            FontAttributes attr   = CellBase.DescriptionFontAttributes ?? CellParent.CellDescriptionFontAttributes;

            if (CellBase.DescriptionFontSize > 0)
            {
                DescriptionLabel.Font = FontUtility.CreateNativeFont(family, (float)CellBase.DescriptionFontSize, attr);
            }
            else if (CellParent != null)
            {
                DescriptionLabel.Font = FontUtility.CreateNativeFont(family, (float)CellParent.CellDescriptionFontSize, attr);
            }
        }
Exemplo n.º 2
0
        private void UpdateValueTextFont()
        {
            if (ValueLabel.Font is null)
            {
                return;                 // for HotReload
            }
            string         family = _LabelCell.ValueTextFontFamily ?? CellParent.CellValueTextFontFamily;
            FontAttributes attr   = _LabelCell.ValueTextFontAttributes ?? CellParent.CellValueTextFontAttributes;

            if (_LabelCell.ValueTextFontSize > 0)
            {
                ValueLabel.Font = FontUtility.CreateNativeFont(family, (float)_LabelCell.ValueTextFontSize, attr);
            }
            else if (CellParent != null)
            {
                ValueLabel.Font = FontUtility.CreateNativeFont(family, (float)CellParent.CellValueTextFontSize, attr);
            }
        }
Exemplo n.º 3
0
        private void UpdateValueTextFont()
        {
            string         family = _EntryCell.ValueTextFontFamily ?? CellParent.CellValueTextFontFamily;
            FontAttributes attr   = _EntryCell.ValueTextFontAttributes ?? CellParent.CellValueTextFontAttributes;

            if (_EntryCell.ValueTextFontSize > 0)
            {
                ValueField.Font = FontUtility.CreateNativeFont(family, (float)_EntryCell.ValueTextFontSize, attr);
            }
            else if (CellParent != null)
            {
                ValueField.Font = FontUtility.CreateNativeFont(family, (float)CellParent.CellValueTextFontSize, attr);
            }

            //make the view height fit font size
            nfloat contentH = ValueField.IntrinsicContentSize.Height;
            CGRect bounds   = ValueField.Bounds;

            ValueField.Bounds = new CGRect(0, 0, bounds.Width, contentH);

            _FieldWrapper.Bounds = new CGRect(0, 0, _FieldWrapper.Bounds.Width, contentH);
        }