Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ValueConversion(typeof(String), typeof(FlowDocument))]
- public class PlurkToDocumentConverter : IValueConverter
- {
- #region IValueConverter Members
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- Run run = new Run((String)value);
- run.FontSize = 12;
- Paragraph paragraph = new Paragraph(run);
- paragraph.Padding = new System.Windows.Thickness(0.0);
- FlowDocument document = new FlowDocument(paragraph);
- document.PagePadding = new System.Windows.Thickness(0.0);
- return document;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- #endregion
- }
Add Comment
Please, Sign In to add comment