Пример #1
0
        public static Label NewLabelFormattedString(FormattedString formattedText, string fontSize = VariablesGlobal.TEXT_SIZE_MEDIUM)
        {
            Label label = new Label {
                FormattedText = formattedText
            };

            label.FontSize = FontSizes.DeviceNamedFontSize(fontSize, label);

            return(label);
        }
Пример #2
0
        public static Label NewLabelString(string text = "", string fontSize = VariablesGlobal.TEXT_SIZE_MEDIUM)
        {
            Label label = new Label {
                Text = text
            };

            label.FontSize = FontSizes.DeviceNamedFontSize(fontSize, label);

            return(label);
        }
Пример #3
0
        public static Entry NewEntry(string text = "", string fontSize = VariablesGlobal.TEXT_SIZE_MEDIUM)
        {
            Entry entry = new Entry
            {
                Text = text,
            };

            entry.FontSize = FontSizes.DeviceNamedFontSize(fontSize, entry);

            return(entry);
        }
Пример #4
0
        public static Editor NewEditor(string text = "", string fontSize = VariablesGlobal.TEXT_SIZE_MEDIUM, double margin = 0)
        {
            Editor editor = new Editor
            {
                Text   = text,
                Margin = margin,
            };

            editor.FontSize = FontSizes.DeviceNamedFontSize(fontSize, editor);

            return(editor);
        }
Пример #5
0
        public static Span NewSpan(string text = "", string fontSize = VariablesGlobal.TEXT_SIZE_MEDIUM, FontAttributes fontAttributes = FontAttributes.None, string foregroundColour = "")
        {
            Span span = new Span
            {
                Text           = text,
                FontAttributes = fontAttributes,
            };

            span.ForegroundColor = Validation.ValidateHexCode(foregroundColour);
            span.FontSize        = FontSizes.DeviceNamedFontSize(fontSize, span);

            return(span);
        }