wpf - When to use Custom/User Control or Template/Style -


I am creating a logger application for learning WPF, and I want new messages below a scroll viewer Some listener raises a new message when I see that I want every message to create something that looks like this:

  =============== =========================== = Source | Message = = | = = | ====================================   

I got it There are 2 WPF books here, and both "Warnings" are saying that in most cases there are other simpler and better mechanisms than custom / user controls. I was thinking that this can be solved using control templates, and If so, what basis should I use?

Try using a ListView and a GridView Set its view on .

  & lt; ListView & gt; & Lt; ListView.View & gt; & Lt; GridView & gt; & Lt; GridViewColumn header = "source" width = "120" /> & Lt; GridViewColumn header = "message" width = "400" /> & Lt; / GridView & gt; & Lt; /ListView.View> & Lt; / ListView & gt;   

Refer:

Comments