Browse by Tags

All Tags » wpf (RSS)

[WPF] แปลง FlowDocument เป็น Brush, Bitmap ?

Posted 30/07/2009 17:53
by nantcom

พอดีว่า ผมต้องการจะแปลง Flow Document ให้เป็น Bitmap ปรากฏว่า ไม่มีใครนำเสนอวิธีที่ถูกใจผมเลย ก็เลยต้องไป Research มาหน่อย สรุปว่า ผมใช้วิธีนี้ครับ using System; using System.Collections.Generic; using System.Windows.Documents; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Controls.Primitives; namespace CoreSharp.Lib { public static class FlowDocumentExtensions { // The Cache private static Dictionary<int, WeakReference> _VisualBrushes = new Dictionary<int...

อ่านและเขียนคอมเมนต์... (มีแล้ว 0)
มีคนดูแล้ว 1,303 คน