Setting up font of TextBox from code behind Setting up font of TextBox from code behind wpf wpf

Setting up font of TextBox from code behind


txtEditor.FontFamily = new FontFamily("Consolas"); // the Media namespace


Use the following syntax:

lblCounting.Font  = new Font("Times New Roman", 50);

Where lblCounting is just any label.


System.Drawing.Font = new Font("Arial", 8, FontStyle.Bold);