DEV Community

Cover image for WPF User Control Injection
John Peters
John Peters

Posted on • Updated on

WPF User Control Injection

Injecting small parts into a MainWindow is easy in WPF (once we know how).

Alt Text

We have to import the content of the folder first, in this case it's our 'usercontrols' folder which contains all our parts.

We give it a name of 'ucs' and the subsequent reference automatically present the user controls to select.

Result:
Alt Text

Here we see three tab items that came from our 'usercontrols' folder.

JWP2021 WPF UserControls

Top comments (0)