コード例 #1
0
ファイル: UserControl_Cs.cs プロジェクト: qisoftJon/xaml-docs
        private void GettingActualValueFromThemableFont(DocumentTheme theme, ThemableFontFamily themableFont)
        {
            #region radwordsprocessing-concepts-document-themes_8
            var actualFont = themableFont.GetActualValue(theme);

            // the actualFont is the same as the Major font of the fontScheme
            #endregion
        }
コード例 #2
0
        public void Demo()
        {
            #region radspreadsheet-model-features-styling-document-themes_0
            ThemeColorScheme colorScheme = new ThemeColorScheme(
                "Mine",
                Colors.Black,     // background 1
                Colors.Blue,      // text 1
                Colors.Brown,     // background 2
                Colors.Cyan,      // text 2
                Colors.DarkGray,  // accent 1
                Colors.Gray,      // accent 2
                Colors.Green,     // accent 3
                Colors.LightGray, // accent 4
                Colors.Magenta,   // accent 5
                Colors.Orange,    // accent 6
                Colors.Purple,    // hyperlink
                Colors.Red);      // followedHyperlink
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_1
            ThemableColor themableColor = new ThemableColor(ThemeColorType.Accent1);
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_2
            ThemeFontScheme fontScheme = new ThemeFontScheme(
                "Mine",
                "Times New Roman",  // latinMajor
                "Arial");           // latinMinor
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_3
            ThemableFontFamily themableFont = new ThemableFontFamily(ThemeFontType.Major);
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_4
            DocumentTheme theme = new DocumentTheme("Mine", colorScheme, fontScheme);
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_5
            DocumentTheme theme1 = new DocumentTheme("From Predefined schemes", PredefinedThemeSchemes.ColorSchemes[0], PredefinedThemeSchemes.FontSchemes[5]);
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_6
            Workbook workbook = new Workbook();
            workbook.Worksheets.Add();
            workbook.Theme = theme;
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_7
            Color actualColor = themableColor.GetActualValue(theme);
            // the actual color is the same as Accent1 color of the colorScheme
            #endregion

            #region radspreadsheet-model-features-styling-document-themes_8
            var actualFont = themableFont.GetActualValue(theme);
            // the actualFont is the same as the Major font of the fontScheme
            #endregion
        }
コード例 #3
0
        private void InsertCodeSnippet(RadFlowDocumentEditor editor)
        {
            #region radwordsprocessing-editing-radflowdocumenteditor_11
            // Set code block formatting
            var codeFont = new ThemableFontFamily(new FontFamily("Consolas"));
            editor.CharacterFormatting.FontFamily.LocalValue   = codeFont;
            editor.ParagraphFormatting.SpacingAfter.LocalValue = 0;

            editor.InsertLine("static void Main(string[] args)");
            editor.InsertLine("{");
            editor.InsertLine("    Console.WriteLine(\"Hello World\");");
            editor.InsertLine("}");
            #endregion
        }
コード例 #4
0
ファイル: UserControl_Cs.cs プロジェクト: qisoftJon/xaml-docs
 private void CreatheThemableFontFamily()
 {
     #region radwordsprocessing-concepts-document-themes_3
     ThemableFontFamily themableFont = new ThemableFontFamily(ThemeFontType.Major);
     #endregion
 }