コード例 #1
0
 static TextFormattingMenuItem FontFormatingMenuItem(TextFormatting textFormatting) =>
 new TextFormattingParentMenuItem(textFormatting, "Style", new List <TextFormattingMenuItem>()
 {
     new TextDecorationMenuItem(textFormatting, "Bold", "Bold"),
     new TextDecorationMenuItem(textFormatting, "Italic", "Italic"),
     new TextDecorationMenuItem(textFormatting, "Underline", "Underline"),
     new TextDecorationMenuItem(textFormatting, "Overline", "Overline"),
     new TextDecorationMenuItem(textFormatting, "Strikethrough", "Strikethrough")
 });
コード例 #2
0
 public static List <TextFormattingMenuItem> MenuItems(TextFormatting textFormatting) =>
 new List <TextFormattingMenuItem>()
 {
     FontFamilyMenuItem(textFormatting),
     FontSizeMenuItem(textFormatting),
     new ClearFormattingMenuItem(textFormatting)
     {
         BeginGroup = false
     }
 };
コード例 #3
0
 public static TextFormattingMenuItem FontSizeMenuItem(TextFormatting textFormatting) =>
 new FontFormattingParentMenuItem(textFormatting, "Size", new List <TextFormattingMenuItem>()
 {
     new FontSizeMenuItem(textFormatting, "8pt", 8),
     new FontSizeMenuItem(textFormatting, "10pt", 10),
     new FontSizeMenuItem(textFormatting, "12pt", 12),
     new FontSizeMenuItem(textFormatting, "14pt", 14),
     new FontSizeMenuItem(textFormatting, "18pt", 18),
     new FontSizeMenuItem(textFormatting, "24pt", 24),
     new FontSizeMenuItem(textFormatting, "36pt", 36)
 });
コード例 #4
0
        public static TextFormattingMenuItem FontFamilyMenuItem(TextFormatting textFormatting, bool withDefualt = true)
        {
            var fontFamilies = new List <TextFormattingMenuItem>()
            {
                new FontFamilyMenuItem(textFormatting, "Times New Roman", "Times New Roman"),
                new FontFamilyMenuItem(textFormatting, "Tahoma", "Tahoma"),
                new FontFamilyMenuItem(textFormatting, "Verdana", "Verdana"),
                new FontFamilyMenuItem(textFormatting, "Arial", "Arial"),
                new FontFamilyMenuItem(textFormatting, "MS Sans Serif", "MS Sans Serif"),
                new FontFamilyMenuItem(textFormatting, "Courier", "Courier"),
                new FontFamilyMenuItem(textFormatting, "Segoe UI", "Segoe UI"),
            };

            if (withDefualt)
            {
                fontFamilies.Add(new FontFamilyMenuItem(textFormatting, "Default", null)
                {
                    BeginGroup = true
                });
            }
            return(new FontFormattingParentMenuItem(textFormatting, "Font", fontFamilies));
        }
コード例 #5
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 protected TextFormattingMenuItem(TextFormatting textFormatting, string text)
 {
     TextFormatting = textFormatting;
     Text           = text;
 }
コード例 #6
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public override void Click()
 {
     TextFormatting.ClearFormatting();
 }
コード例 #7
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public ClearFormattingMenuItem(TextFormatting textFormatting) : base(textFormatting, "Clear Formatting")
 {
 }
コード例 #8
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public ChangeCaseMenuItem(TextFormatting textFormatting, string text, string textCase) : base(textFormatting, text)
 {
     TextCase = textCase;
 }
コード例 #9
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public TextDecorationMenuItem(TextFormatting textFormatting, string text, string attributeName) : base(textFormatting, text)
 {
     AttributeName = attributeName;
 }
コード例 #10
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public FontSizeMenuItem(TextFormatting textFormatting, string text, int fontSize) : base(textFormatting, text)
 {
     FontSize = fontSize;
 }
コード例 #11
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public FontFamilyMenuItem(TextFormatting textFormatting, string text, string fontFamily) : base(textFormatting, text)
 {
     FontFamily = fontFamily;
 }
コード例 #12
0
ファイル: TextFormatting.cs プロジェクト: wy10001111/Blazor
 public TextFormattingParentMenuItem(TextFormatting textFormatting, string text, List <TextFormattingMenuItem> children) : base(textFormatting, text)
 {
     Children = children;
 }
コード例 #13
0
 public FontFormattingParentMenuItem(TextFormatting textFormatting, string text, List <TextFormattingMenuItem> children)
     : base(textFormatting, text, children)
 {
 }