예제 #1
0
 public static void SetFontDefn(this ClientTextBlock TextBlock, FontDefn FontDefn)
 {
     TextBlock.FontFamily = FontDefn.Family;
     TextBlock.FontSize   = FontDefn.PointSize;
     TextBlock.FontWeight = FontDefn.Weight;
     TextBlock.Foreground = FontDefn.Foreground;
 }
예제 #2
0
 /// <summary>
 /// set the font, color, etc of the TextBlock control that is on the Canvas.
 /// </summary>
 /// <param name="CharBoxDim"></param>
 /// <param name="KernDim"></param>
 /// <param name="FontDefn"></param>
 public void SetPaintDefn(Size CharBoxDim, Size KernDim, FontDefn FontDefn)
 {
     this.TextBlock.FontFamily = FontDefn.Family;
     this.TextBlock.FontSize   = FontDefn.PointSize;
     this.TextBlock.FontWeight = FontDefn.Weight;
     this.TextBlock.Foreground = FontDefn.Foreground;
     this.TextBlock.ChangeSizeBasis(CharBoxDim, KernDim);
 }
예제 #3
0
 public VisualTextBlock(string Text, ZeroRowCol RowCol, byte?AttrByte,
                        Size CharBoxDim, Size KernDim, FontDefn FontDefn)
     : base(RowCol, AttrByte)
 {
     this.TextBlock = new ClientTextBlock(CharBoxDim, KernDim);
     SetPaintDefn(CharBoxDim, KernDim, FontDefn);
     this.ShowText = Text;
 }
예제 #4
0
 /// <summary>
 /// set the font, color, etc of the TextBlock control that is on the Canvas.
 /// </summary>
 /// <param name="CharBoxDim"></param>
 /// <param name="KernDim"></param>
 /// <param name="FontDefn"></param>
 public void SetPaintDefn(Size CharBoxDim, Size KernDim, FontDefn FontDefn)
 {
     this.TextBlock.SetFontDefn(FontDefn);
     if (this.ForegroundBrush != null)
     {
         this.TextBlock.Foreground = this.ForegroundBrush;
     }
     this.TextBlock.ChangeSizeBasis(CharBoxDim, KernDim);
 }