-1

How can I create magnifier with pixels grid in WPF app?

I need that pixels under mu cursor of mouse showing in circle of magnifier in enlarged size, for example like on photo.

enter image description here

I try use separate element, which inheritance by from FrameworkElement, but I drew only ordinary pixels grid.

Alex1347
  • 1
  • 1
  • I think you will have to [create a `Screen` from the control](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.screen.fromcontrol?view=windowsdesktop-7.0), copy the appropriate pixels and render them in your magnifier control. Easier said then done. [Here](https://github.com/bert2/VsEnvironmentColorsFinder/blob/main/EnvironmentColorsFinder/ColorPickOverlayForm.cs)'s an implementation of a control to pick colors from a WPF window that might help you getting started. It's Winforms though, not sure how much you can re-use in WPF. – Good Night Nerd Pride Aug 31 '23 at 13:07
  • You know there's a windows magnifier? https://support.microsoft.com/en-us/windows/use-magnifier-to-make-things-on-the-screen-easier-to-see-414948ba-8b1c-d3bd-8615-0e5e32204198#:~:text=Turn%20on%20Magnifier-,To%20quickly%20turn%20on%20Magnifier%2C%20press%20the%20Windows%20logo%20key,%3E%20Magnifier%20%3E%20Turn%20on%20Magnifier. – Andy Sep 01 '23 at 09:05