Пример #1
0
        public MarkdownTheme()
        {
            Paragraph = new MarkdownStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Heading1 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                BorderSize = 1,
                FontSize   = 26,
            };

            Heading2 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                BorderSize = 1,
                FontSize   = 22,
            };

            Heading3 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 20,
            };

            Heading4 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 18,
            };

            Heading5 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 16,
            };

            Heading6 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 14,
            };

            Link = new LinkStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Code = new MarkdownStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Quote = new MarkdownStyle
            {
                Attributes      = FontAttributes.None,
                BorderSize      = 4,
                FontSize        = 12,
                BackgroundColor = Color.Gray.MultiplyAlpha(.1),
            };

            Separator = new MarkdownStyle
            {
                BorderSize = 2,
            };

            OrderedList = new ListStyle
            {
                BulletStyleType       = ListStyleType.Decimal,
                BulletVerticalOptions = LayoutOptions.Start,
                ItemVerticalOptions   = LayoutOptions.Start,
            };

            UnorderedList = new ListStyle
            {
                BulletStyleType       = ListStyleType.Square,
                BulletVerticalOptions = LayoutOptions.Center,
                ItemVerticalOptions   = LayoutOptions.Center,
            };

            // Platform specific properties
            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                Code.FontFamily = "Courier";
                break;

            case Device.Android:
                Code.FontFamily = "monospace";
                break;
            }
        }
Пример #2
0
        public MarkdownTheme()
        {
            Paragraph = new MarkdownStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Heading1 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                BorderSize = 1,
                FontSize   = 26,
            };

            Heading2 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                BorderSize = 1,
                FontSize   = 22,
            };

            Heading3 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 20,
            };

            Heading4 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 18,
            };

            Heading5 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 16,
            };

            Heading6 = new MarkdownStyle
            {
                Attributes = FontAttributes.Bold,
                FontSize   = 14,
            };

            Link = new MarkdownStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Code = new MarkdownStyle
            {
                Attributes = FontAttributes.None,
                FontSize   = 12,
            };

            Quote = new MarkdownStyle
            {
                Attributes      = FontAttributes.None,
                BorderSize      = 4,
                FontSize        = 12,
                BackgroundColor = Color.Gray.MultiplyAlpha(.1),
            };

            Separator = new MarkdownStyle
            {
                BorderSize = 2,
            };

            // Platform specific properties
            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                Code.FontFamily = "Courier";
                break;

            case Device.Android:
                Code.FontFamily = "monospace";
                break;
            }
        }