jiasli
jiasli

Reputation: 9138

How to display WPF's XAML element in class diagram

I have a WPF project, in MainWindow there are some controls

<Button/> 
<TextBox/> 

How can I get them displayed in class diagram like this?

enter image description here

I know in WinForm it works, but how about in WPF?

Upvotes: 1

Views: 1472

Answers (1)

Bas
Bas

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

Related Questions