¿Una cuadrícula de WPF funciona mejor que el Panel de diseño de tabla de Winform?

I am currently working on an application that uses a Table Layout Panel to display a row of data. Each row contains a certain number of textbox and checkbox.

The number of rows present is usually quite big, making the loading and navigation of the Table Layout Panel extremely slow.

After some research, I've found that the TLP is one of the slowest Winform UI controls and I'd like to implement a WPF Grid instead.

Mi pregunta es doble:

1) Does a WPF Grid perform better than a Table Layout Panel when it comes to a large number of rows ?

2) Is it possible to include WPF controls in an application that uses exclusively winform controls ? (The application uses .NET 3.5)

Thanks for your time and have a great day.

preguntado el 08 de enero de 11 a las 23:01

Why not use DataGridView? It's made for displaying rows of data... -

Does the DataGridView perform better than the Table Layout Panel ? Thanks for your help. -

I checked, a DataGridView can't help me since the data that I display isn't just raw text. Each row is a combination of multiple textboxes. Not only that, but the textboxes respect a certain order and layout. They are not close to each other and of the same size. -

2 Respuestas

For performance, you'll have to do your own comparison. There are so many factors that could affect it that a well-written WinForms could be faster than a poorly-written WPF or vice versa. Just do a little prototyping and see if its an obvious win for you.

As far as using a little WPF in a mostly WinForms application, yes that is supported and can work well. Just put your WPF content in a WPF UserControl and then add an ElementHost to your form and host the WPF control inside that. Here's a lot more information:

Respondido el 09 de enero de 11 a las 06:01

Do you have background worker or thread for loading element into Table Layout Panel, if you have the problem with freezing?

Respondido el 09 de enero de 11 a las 02:01

Adding elements to the Table Layout Panel is not done using threads. I planned on adding multithreading, but manipulating (i.e: scrolling or resizing) the Table Layout Panel will still be slow, hence why I preferred implementing WPF from the get-go. - Hussein Khalil

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.