Home > Blockchain >  How to change wpf richTextBox background color in the designer and not in code?
How to change wpf richTextBox background color in the designer and not in code?

Time:05-04

This is by code :

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            RichTextBoxLogger.Background = Brushes.Black;
            CenterWindowOnScreen();
        }

but what if i want to set the background color of the richTextBox control in the designer and not in the code ? because in the designer the richTextBox background color is still white.

CodePudding user response:

Usually a RichTextBlox contains a FlowDocument, try by setting the background of the document instead.

  • Related