Adding Controls into Xaml through C# Code, Performance Concerns

Multi tool use


Adding Controls into Xaml through C# Code, Performance Concerns
I'm Newbie in WPF and i want to know if is there any performance issue when i add a Child into a Container from C# codes in WPF instead of adding it in the XAML?
I have so many control manipulation in my project and it's important to know to for me if i must try to design UserControls
and design ControlTemplates
to get the better performance.
UserControls
ControlTemplates
for example i want to know if I add each the records in my List, manually by iterating it and creating a the rows; does it takes more cost of executing than Binding
it to predefined grid (rows, ...) Template ?
Binding
does Binding
s makes my code fast in runtime?
Binding
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What stops you from trying it out? That said, what you're describing sounds like you should be using an ItemsControl instead of manually creating list items.
– Clemens
2 mins ago