Chart
Now ReoGrid 1.0 version supports to show Chart on worksheet. It’s also possible to load charts from Excel files.
Documents about charts:
Floating Objects
ReoGrid 0.8.9 supports excellent graphics drawing functionality. From this version, it is possible to add and show graphic shapes like rectangle, line, rounded rectangle and images on worksheet. ReoGrid also support to read the floating objects from Excel file; by using this functionality, it would be able to display an Excel-based drawing report such as workflow chart in .NET application.
Drawing Shapes
Learn more about floating objects.
Floating Images
Learn more about floating image.
Rich format text display
0.8.9 Pro-edition supports that display rich format text in cell or drawing objects, learn more about Rich format text.
Multiple Platform Support
ReoGrid 0.8.9 has a built-in platform no-associated graphics interface that was designed to render graphics on different platforms, the rendering engine can work in both Windows Form (GDI) and WPF, as well as to use Hardware Acceleration (Direct2D) to get excellent graphics performance in future version.
Using the graphics interface provided by ReoGrid instead of GDI and WPF classes will make the code can work on multiple platforms.
Custom Data Formatter
An interface for custom data formatter has been introduced from this version, see Custom Data Formatter.
Upgrade to 0.8.9
The 0.8.9 ReoGrid core includes many improvement and differences compared to old versions, to implement the drawing and chart on different platforms (WinForm and WPF) there is an independent graphics module has been introduced, which was designed to be used instead of classes from System.Drawing
(WinForm) and System.Media
(WPF) what provided by .NET framework, the new graphics interface keeps high compatible to convert between the classes from System.Drawing
and System.Windows.Media
.
The following points are the differences should be noted when upgrading to 0.8.9.
Use Point, Size and Rectangle classes
The following classes (or structs) are provided and used inside ReoGrid, they could be converted into the types that are provided from System.Drawing
and System.Windows.Media
automatically. However, many type casts will slow down the performance of application, according to different cases, we recommend to use the following classes that are provided by ReoGrid directly in your application.
All classes are included in unvell.ReoGrid.Graphics
namespace.
- Point – Two-coordinates (x, y) position information
- Size – Contains the width and height information
- Rectangle – Contains the top-left position and size
- SolidColor – ARGB color struct
- LineStyle – Line style enumeration
- LineCapStyles – Line cap enumeration
The Point
, Size
and Rectangle
classes have the properties such as X
, Y
, Width
and Height
, these properties are defined as float
in WinForm edition, and defined as double
in WPF edition.
Changed Classes
The following classes has been renamed, added or removed.
RGDrawingContext
renamed toCellDrawingContext
RGDrawingContext.PlatformGraphics
property has been removed, new property calledGraphics
added- Use
unvell.ReoGrid.Interaction.KeyCode
class instead ofSystem.Windows.Forms.Keys
PageSettings
property removed from worksheet, all elements in this class are merged intoPrintSettings
propertyCreatePrintDocument
method renamed toCreatePrintSession
Document
property ofPrintSession
renamed toPrintDocument
(only WinForm edition)
Do not use directly the GDI objects unless special cases
In old version before 0.8.9, to do owner drawing it might be necessary to use the GDI classes such as Brush
and Pen
object; In 0.8.9 and later, use the render method of graphics interface and just pass the color object (SolidColor
) to specify the color of object.
Before 0.8.9: Use GDI brush and graphics interface to draw object
using (var b = new SolidBrush(this.Cell.Style.BackColor)) { dc.PlatformGraphics.FillRectangle(b, this.Bounds); }
After 0.8.9: Use ReoGrid graphics interface to draw object
dc.Graphics.FillRectangle(this.Cell.Style.BackColor, this.Bounds);
The second code can work on both Windows Form and WPF platform.