示例#1
0
 public static ShapesBase.BaseTextBlock TextBlockToBase(TextBlock textBlock)
 {
     ShapesBase.BaseTextBlock baseText = new ShapesBase.BaseTextBlock();
     baseText.FontSize   = textBlock.FontSize;
     baseText.Foreground = textBlock.Foreground;
     baseText.Text       = textBlock.Text;
     baseText.Thickness  = textBlock.Margin;
     return(baseText);
 }
示例#2
0
        public static TextBlock BaseToTextBlock(ShapesBase.BaseTextBlock baseText)
        {
            TextBlock textBlock = new TextBlock();

            textBlock.FontSize   = baseText.FontSize;
            textBlock.Foreground = baseText.Foreground;
            textBlock.Text       = baseText.Text;
            textBlock.Margin     = baseText.Thickness;
            return(textBlock);
        }