コード例 #1
0
        public void SetFontStyle(string fontStyleSValue)
        {
            var fontStyle = FontStyleHelpers.ParseFontStyle(fontStyleSValue);

            if (_fontStyle != fontStyle)
            {
                _fontStyle = fontStyle;
                MarkUpdated();
            }
        }
コード例 #2
0
        public void SetFontWeight(string fontWeightValue)
        {
            var fontWeight = FontStyleHelpers.ParseFontWeight(fontWeightValue);

            if (_fontWeight.HasValue != fontWeight.HasValue ||
                (_fontWeight.HasValue && fontWeight.HasValue &&
                 _fontWeight.Value.Weight != fontWeight.Value.Weight))
            {
                _fontWeight = fontWeight;
                MarkUpdated();
            }
        }
コード例 #3
0
        public void SetFontWeight(string fontWeightValue)
        {
            var fontWeight = FontStyleHelpers.ParseFontWeight(fontWeightValue);

            if (_fontWeight.HasValue != fontWeight.HasValue ||
                (_fontWeight.HasValue && fontWeight.HasValue &&
#if WINDOWS_UWP
                 _fontWeight.Value.Weight != fontWeight.Value.Weight))
#else
                 _fontWeight.Value.ToOpenTypeWeight() != fontWeight.Value.ToOpenTypeWeight()))
#endif
            {
                _fontWeight = fontWeight;
                MarkUpdated();
            }
        }
コード例 #4
0
        public void SetFontWeight(ReactTextBox view, string fontWeightString)
        {
            var fontWeight = FontStyleHelpers.ParseFontWeight(fontWeightString);

            view.FontWeight = fontWeight ?? FontWeights.Normal;
        }
コード例 #5
0
        public void SetFontStyle(PasswordBox view, string fontStyleString)
        {
            var fontStyle = FontStyleHelpers.ParseFontStyle(fontStyleString);

            view.FontStyle = fontStyle ?? FontStyle.Normal;
        }
コード例 #6
0
        public void SetFontStyle(ReactTextBox view, string fontStyleString)
        {
            var fontStyle = FontStyleHelpers.ParseFontStyle(fontStyleString);

            view.FontStyle = fontStyle ?? new FontStyle();
        }