private static Paragraph BuildJaViExample(JaViExample exam) { if (string.IsNullOrWhiteSpace(exam?.Japanese)) { return(null); } return(new Paragraph() { Margin = new Thickness(0, 5, 0, 0), LineHeight = 20, Inlines = { new Run(exam.Japanese) { Foreground = Brushes.Blue, }, new LineBreak(), new Run(exam.VietNamese) { FontSize = 13, Foreground = Brushes.Gray, FontStyle = FontStyles.Italic } } }); }
public static ExampleModel Create(JaViExample jaVi) { return(new ExampleModel { Id = jaVi.Id, Japanese = jaVi.Japanese, VietNamese = jaVi.VietNamese }); }