Reputation: 1590
am a beginner and until now I've been re-sizing my control in the VS designer, i wonder what is the correct place to initialize a control property.
Upvotes: 0
Views: 564
Reputation: 8095
Usually you want your user interface controls to automatically resize with the parent Window, for instance when the user resizes the window. In this case, you don't want to specify a hard and fast width/height in your code or in the VS designer. You would instead place the user control inside of one of the appropriate layout controls available in WPF.
There are, however, some times when you want your user control to be one size and always one size. In this case, you would assign it in one of two places:
<UserControl Width="100" Height="100" />
Style
.Upvotes: 2