3
Answers

Building an UI from code behind

person

person

15y
3.9k
1
Hi,

I was wondering if there is a way of defining WPF components in the code behind, building a full UI inside a Grid, then inserting this into a global container (WPF or WinForms).

i.e. a textblock with 2 buttons --> added to -- > wrappanel --> inserted into a wpf window

all from code behind.

Thanks in advance.

Person.
Answers (3)
0
Administrator
Admin 2.3k 1.3m 22y
Do some readings on regions and invalidating and clipping regions. You certainly don't want to load every thing on the form if you only need a small portion of the form to be rendered.