Reputation: 9138
I have a WPF project, in MainWindow there are some controls
<Button/>
<TextBox/>
How can I get them displayed in class diagram like this?
I know in WinForm it works, but how about in WPF?
Upvotes: 1
Views: 1472
Reputation: 27105
The class diagram as you present it works with fields declared in the form class. WPF will not automatically generate a backing field for a WPF control unless you name it. E.g.
<Button Name="MyButton" />
Creates a field called MyButton
in the class where you declare it.
Upvotes: 1