コード例 #1
0
        private static Style GetStyle()
        {
            Style style = null;

            // use custom Caption style if it exists

            var styles = new ThemeProvider().Theme.GetStyles();

            if (styles?.Count > 0)
            {
                style = styles.FirstOrDefault(s => s.Name.Equals("Caption"));
            }

            // otherwise use default style

            if (style == null)
            {
                style = new Style
                {
                    Color    = "#5B9BD5",                  // close to CornflowerBlue
                    FontSize = "10pt",
                    IsBold   = true
                };
            }

            return(style);
        }