Skip to content

Add DrawingRenderContext - #2168

Open
IngeborgAtRS wants to merge 1 commit into
oxyplot:developfrom
IngeborgAtRS:fix-WPF-rendering
Open

Add DrawingRenderContext#2168
IngeborgAtRS wants to merge 1 commit into
oxyplot:developfrom
IngeborgAtRS:fix-WPF-rendering

Conversation

@IngeborgAtRS

@IngeborgAtRS IngeborgAtRS commented Aug 12, 2026

Copy link
Copy Markdown

Fixes #1794.

Checklist

  • I have included examples or tests
  • I have updated the change log
  • I am listed in the CONTRIBUTORS file
  • I have cleaned up the commit history (use rebase and squash)

Changes proposed in this pull request:

  • Add a new rendering context for WPF that renders the graph to a DrawingGroup instead of creating WPF elements. This improves performance slightly but most importantly, it avoids the nasty behavior of creating new children to the Canvas during the Render phase. When there are a lot of curves this can cause the WPF Measure/Arrange/Render cycle to break and fail to redraw the curves.

  • Create a base class WpfRenderContext that holds functionality shared between the different rendering modes. PlotView.RenderContext now returns this type instead of CanvasRenderContext.

  • Tooltips now work in the PlotView if you use the DrawingRenderContext.

  • Create a CanvasPlotView in ExampleBrowser.WPF that

  • Replace Assert.Is* with Assert.That(..., Is.*) in all tests to get rid of legacy NUnit calls

  • Fix one of the Issues examples that fails unexpectedly if the current culture does not use dot at decimal separator.

@oxyplot/admins

* Add a new rendering context for WPF that renders the graph to a DrawingGroup instead of creating WPF elements. This improves performance slightly but most importantly, it avoids the nasty behavior of creating new children to the Canvas during the Render phase. When there are a lot of curves this can cause the WPF Measure/Arrange/Render cycle to break and fail to redraw the curves.

* Create a base class WpfRenderContext that holds functionality shared between the different rendering modes. PlotView.RenderContext now returns this type instead of CanvasRenderContext.

* Tooltips now work in the PlotView if you use the DrawingRenderContext.

* Create a CanvasPlotView in ExampleBrowser.WPF that

* Replace Assert.Is* with Assert.That(..., Is.*) in all tests to get rid of legacy NUnit calls

* Fix one of the Issues examples that fails unexpectedly if the current culture does not use dot at decimal separator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blank Plot on InvalidatePlot (WPF)

1 participant