≈ the.bay.news

Obfuscating a WinUI 3 app: what {x:Bind} already made rename-safe, and the three strings that still break it

DEV Community
Obfuscating a WinUI 3 app: what {x:Bind} already made rename-safe, and the three strings that still break it
WinUI 3 compiles {x:Bind} to a generated binding class in your own assembly — a typed getter call by metadata token plus a literal PropertyName compare — so the whole view model renames cleanly. The failures that remain are the three places WinUI or your own code still goes through a string: a classic {Binding} path resolved by reflection, a page located by Type.GetType on a built-up name, and a type the Package.appxmanifest activates by its literal name. This post reads the generated binding code, shows why x:Bind survives a full rename while {Binding} comes back empty, explains which custom dependency-property names are actually load-bearing, and gives the Nebula configuration that flattens the app while leaving the string-resolved surface intact.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.