-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Suggestion:
I have a problem that scott plot is not reflecting the display scale in WinUi and in attachement should be path that should fix it.
// add this line to WinUiPlot() method in WinUIPlot.cs
Loaded += WinUIPlot_Loaded;
//then created a handler for it this is called after initialization of the WinUiPlot to get proper display scale
private void WinUIPlot_Loaded(object sender, RoutedEventArgs e)
{
if (XamlRoot != null)
{
XamlRoot.Changed += DetectDisplayScale; ;
Plot.ScaleFactor = XamlRoot.RasterizationScale;
DisplayScale = (float)XamlRoot.RasterizationScale;
}
}
// and also handler for detect display scale it is called when user move application from monitors with different scale
private void DetectDisplayScale(XamlRoot sender, XamlRootChangedEventArgs args)
{
if (XamlRoot != null)
{
Plot.ScaleFactor = XamlRoot.RasterizationScale;
DisplayScale = (float)XamlRoot.RasterizationScale;
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels