|
|
|
@ -29,7 +29,7 @@ namespace ControlCatalog.Pages |
|
|
|
var screens = w.Screens.All; |
|
|
|
var scaling = ((IRenderRoot)w).RenderScaling; |
|
|
|
|
|
|
|
var drawBrush = Brushes.Green; |
|
|
|
var drawBrush = Brushes.Black; |
|
|
|
Pen p = new Pen(drawBrush); |
|
|
|
if (screens != null) |
|
|
|
foreach (Screen screen in screens) |
|
|
|
@ -45,18 +45,16 @@ namespace ControlCatalog.Pages |
|
|
|
screen.Bounds.Height / 10f); |
|
|
|
Rect workingAreaRect = new Rect(screen.WorkingArea.X / 10f + Math.Abs(_leftMost), screen.WorkingArea.Y / 10f, screen.WorkingArea.Width / 10f, |
|
|
|
screen.WorkingArea.Height / 10f); |
|
|
|
|
|
|
|
context.DrawRectangle(p, boundsRect); |
|
|
|
context.DrawRectangle(p, workingAreaRect); |
|
|
|
|
|
|
|
FormattedText text = new FormattedText() |
|
|
|
{ |
|
|
|
Typeface = Typeface.Default |
|
|
|
}; |
|
|
|
|
|
|
|
text.Text = $"Bounds: {screen.Bounds.Width}:{screen.Bounds.Height}"; |
|
|
|
var text = new FormattedText() { Typeface = new Typeface("Arial"), FontSize = 18 }; |
|
|
|
|
|
|
|
text.Text = $"Bounds: {screen.Bounds.TopLeft} {screen.Bounds.Width}:{screen.Bounds.Height}"; |
|
|
|
context.DrawText(drawBrush, boundsRect.Position.WithY(boundsRect.Size.Height), text); |
|
|
|
|
|
|
|
text.Text = $"WorkArea: {screen.WorkingArea.Width}:{screen.WorkingArea.Height}"; |
|
|
|
text.Text = $"WorkArea: {screen.WorkingArea.TopLeft} {screen.WorkingArea.Width}:{screen.WorkingArea.Height}"; |
|
|
|
context.DrawText(drawBrush, boundsRect.Position.WithY(boundsRect.Size.Height + 20), text); |
|
|
|
|
|
|
|
text.Text = $"Scaling: {screen.PixelDensity * 100}%"; |
|
|
|
|