public void DrawText_Various_Sizes() { UserControl userControl = new UserControl(); userControl.Width = 200; userControl.Height = 200; Grid container = new Grid(); userControl.Content = container; Point p = new Point(); double size = 6; while (p.Y < userControl.Height) { FormattedText text = new FormattedText( "Hello World", CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Ariel"), size, new SolidColorBrush(Colors.Black)); DrawTextControl testControl = new DrawTextControl(); testControl.Text = text; testControl.Position = p; p.Y += text.Height; size += size / 2; container.Children.Add(testControl); } this.RenderToFile(userControl); this.CompareImages(); }