transparent backgrounds for FormsPlot and WpfPlot
See original GitHub issueIs it possible to set transparent background on formsPlot control in WinForms?
formsPlot.plt.Style(figBg: Color.Transparent);
formsPlot.plt.Style(dataBg: Color.Transparent);
This makes blue background as we see in the designer. It seems that bitmap can be generated with transparency, but I need it in WinForms control.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
winforms - C# transparent background for window form
Creating a background image, painting the transparent area of it with a specific color and setting it as the form BackgroundImage... then ...
Read more >ScottPlot Changelog
WpfPlot : Converted the UserControl to a CustomControl to facilitate ... ClearType back to AntiAliased to improve text appearance on transparent backgrounds.
Read more >How to: Give Your Control a Transparent Background - ...
Windows Forms controls do not support true transparency. The background of a transparent Windows Forms control is painted by its parent.
Read more >Untitled
Basically, you will need to use the Visual Studio designer or … transparent backgrounds for FormsPlot and WpfPlot #286 … How to make...
Read more >How to Set Transparent Background for Plotly Plot?
Method 1: Using the "layout" parameter. One simple way to set the background of a Plotly plot to transparent is by using the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@StendProg I think the reason I did this is because
PictureBox
has simple and robust support for double buffering. Drawing directly on the control may produce flickering. This is my understanding, but I haven’t explored this topic in a while - if you are aware of a better way let me know!For what it’s worth, I added support (and a demo) for the WpfPlot control too.
It was hard to track down, but the only change needed was to modify the encoder for
bmp.Save
:https://github.com/swharden/ScottPlot/blob/22e7e23e4a6bb8877a0a801ce1a9557e620ceba8/src/ScottPlot.WPF/WpfPlot.xaml.cs#L82-L92