Skip to content

SP5 WPF: automatic display scaling#2766

Merged
swharden merged 4 commits intoScottPlot:mainfrom
DmitryKotenev:adding-dpi-scale-factor-for-wpf
Jul 18, 2023
Merged

SP5 WPF: automatic display scaling#2766
swharden merged 4 commits intoScottPlot:mainfrom
DmitryKotenev:adding-dpi-scale-factor-for-wpf

Conversation

@DmitryKotenev
Copy link
Contributor

Purpose:

  • Add automatic scaling for ScotPlott5 WPF control

This PR references the issue: #2760

@swharden
Copy link
Member

Thanks @DmitryKotenev!

It felt a little weird using System.Drawing in a WPF app so I looked into it a little and I found this interesting tool which is available in WPF apps targeting .NET Framework 4.6 and newer:

double scaleFactorX = VisualTreeHelper.GetDpi(this).DpiScaleX;

I'm merging this now and it will be in the next release. Thanks again! 🚀

@swharden swharden enabled auto-merge July 18, 2023 02:19
@swharden swharden merged commit c801884 into ScottPlot:main Jul 18, 2023
@DmitryKotenev
Copy link
Contributor Author

@swharden, thanks for correction!🙂

@heartacker
Copy link
Contributor

control is out of window
image

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.

3 participants