private static TextBlock ToTextBlock(TextBox textBox)
 {
     return(new TextBlock
     {
         Text = textBox.Text,
         Foreground = new SolidColorBrush(textBox.TextColor.ToXaml())
     });
 }
 private static Border ToBorder(TextBox textBox)
 {
     return(new Border
     {
         Padding = new Thickness(textBox.PaddingX, textBox.PaddingY, textBox.PaddingX, textBox.PaddingY),
         Margin = new Thickness(textBox.MarginX, textBox.MarginY, textBox.MarginX, textBox.MarginY),
         Background = new SolidColorBrush(textBox.BackColor.ToXaml()),
         HorizontalAlignment = textBox.HorizontalAlignment.ToXaml(),
         VerticalAlignment = textBox.VerticalAlignment.ToXaml(),
         CornerRadius = new CornerRadius(textBox.CornerRadius),
         Child = ToTextBlock(textBox)
     });
 }