LazowskiAnton · Extensions

RulerSmith

Hold Ctrl+Shift over the app you are debugging: the control under the pointer shows its size, and soft arrows show the distances to the controls around it. Let go, and it is gone.

Free · Visual Studio 2022 and 2026 · 14 UI languages · no telemetry

Why RulerSmith

The same form without and with RulerSmith: the outline of a button, its size and the gaps to its neighbours

Real bounds, not a guess

Sizes come from UI Automation — the tree screen readers use — so shadows, gradients and anti-aliasing do not fool it, as they fool a pixel ruler.

The units you write

WPF and web pages lay out in device-independent units: 76 × 32 is what you put in XAML or CSS, and the screen pixels (152 × 64 at 200 %) are shown below it.

Only while the key is held

Nothing is computed or drawn until you hold the key. The overlay never takes a click or the focus, and it rests while the debugger is paused.

Free, without strings attached

No subscriptions, no "pro" version, no data collection, no messages in the Output window or at startup. The only thing we will ever ask — after you have used it for a while — is a rating on the Marketplace. Works on Visual Studio 2022 and 2026, x64 and ARM64.

Features

Measuring

Start debugging, hold Ctrl+Shift and move the pointer over the app. A new control is outlined, its size appears under it, and the gaps run out to the neighbours; the numbers follow the pointer from control to control.

A Save button outlined, with its size and the gaps to Cancel, the comment box and the window edges
On screenMeaning
Thin outlineThe bounds of the control under the pointer. Text or an icon inside a button counts as the button.
Button 76 × 32
152 × 64 px · 200 %
The kind and the size in the app's units; on a scaled display the screen pixels and the scale on a second line.
Solid arrowThe gap to the nearest control on that side. Touching controls show no arrow.
Dashed arrowNo control on that side: the gap to the edge of the container (the client area of a window).

The RulerSmith panel

Debug → RulerSmith Panel (also in View → Other Windows). The toolbar turns measuring on and off — the same switch as Measure Layout on the Debug toolbar — and each kind of app separately: WPF, WinForms, Win32, Web. Below it, the last measurement: the control's name and automation id (it finds the control in XAML), its size, its position in the window and every gap with the control it ends at. The status line tells why nothing is drawn: not debugging, paused at a breakpoint, or measuring off.

The RulerSmith panel with the measured Save button, its size and gaps

Which apps

RulerSmith reads the controls through UI Automation, so it measures what the app exposes there — which is what standard controls do out of the box.

AppNotes
WPFUnits are device-independent. The see-through XAML toolbar Visual Studio lays over a debugged WPF app is skipped; the content of tabs is found.
Windows FormsUnits are the app's pixels: 1:1 for a DPI-aware app, stretched by Windows for one that is not.
Win32, MFCWindows created with CreateWindow and dialogs from resources: buttons, edits, combo boxes, lists, trees.
Web pagesEdge, Chrome and Firefox while debugging — Visual Studio often opens a web project in the browser that is already running. CSS pixels are the units. The Web switch in the panel turns them off.

Not supported: WinUI, UWP and MAUI. A custom control that does not create an automation peer is invisible to UI Automation, and its container is measured instead.

Settings

Tools → Options → SmithWorks → RulerSmith. Every option has a description.

OptionDefault
Hold to measureCtrl+Shift
Measure while debuggingon
Show screen pixels on scaled displayson
Animate the entranceon
Grow the gap arrows out of the controlon
Ask for a rating on the Marketplaceon

Settings are stored in %LocalAppData%\RulerSmith.

RulerSmith options page
The options page.

FAQ

Does RulerSmith send any data?

No. Everything happens on your computer: a small overlay process reads the controls through UI Automation and draws on the screen. No network requests, no telemetry.

Only the whole window (or a large panel) is outlined. Why?

The app does not expose the controls inside it to UI Automation — usually custom controls without an automation peer. Overriding OnCreateAutomationPeer in such a control makes it measurable, and accessible to screen readers too.

Nothing is drawn when I hold the key.

Check that a debug session is running and not paused, and that the panel's status line says Measuring. A kind of app may be switched off in the panel. Another program may use the same keys: choose another combination in the settings.

Why does it stop at a breakpoint?

A paused app cannot answer UI Automation. The overlay rests until you continue (F5).

Will WinUI, UWP or MAUI be supported?

Not for now. If you need them, say so in the Feedback repository.

Can I measure an app without Visual Studio?

Yes: run RulerSmith.Overlay.exe from the extension's folder. It sits in the tray and measures any window while the key is held.

Where do I report a problem or suggest a feature?

Open an issue in the Feedback repository on GitHub — there are forms for bugs and ideas (please change private names). You can also use the Q&A tab on the Marketplace.

Changelog

1.0.2

1.0.1

1.0.0