3 ms·
That's because WPF like winforms used native windows controls under the hood. Calls would be marshaled via pinvoke.
by sureshv 9y ago
That's because WPF like winforms used native windows controls under the hood. Calls would be marshaled via pinvoke.
- Const-me 9y agoWhile interop is indeed available if you need to consume a Win32 control (not without limitations but generally works), by default WPF doesn’t use native controls. Instead it paints stuff on GPU with Direct3D 9, and on top of that implements its own markup, styling, layout, animation, behaviors, composition, etc…
- sureshv 9y agoThanks - I haven't touched windows desktop UI since GDI was the mechanism for drawing.
- Const-me 9y agoSimplest way to verify, launch visual studio 2015, press Tools/Spy++, in Spy++ find the visual studio’s main window, you’ll see that Win32 thinks visual studio is a single window with no children, with class starting with “HwndWrapper[DefaultDomain;” Unlike that, Spy++ itself uses Win32 (wrapped by MFC but it doesn’t matter) for GUI, you’ll see these SysTreeView32, msctls_statusbar32 and other native controls there.
- sureshv 9y agoI stand corrected - thank you. I don't have a windows machine anymore but as you said spy++ can tell you all you need to know. Hilarious to still see hungarian (hwnd - handle to a window).