set fontfamily wpf with C# code example Example: font family behind code uwp c# MainDocument.FontFamily = new FontFamily("Consolas");