Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
1.67/5 (2 votes)
See more:
Hi There,

Is there any way for me to style my list box in c# to look like the image provided? Or similar to the image? My application looks really dull if my listbox (Which is displaying the birthdays of members from the current week) is just plain. I would really like if the listbox items can look like the image provided or close to it at least. Or just MUCH better than the normal plain old c# list box !! :P

Image of the listbox
Posted
Comments
Sergey Alexandrovich Kryukov 11-Aug-14 17:01pm    
It all depends on what do you mean by "ListBox". Which one? Full type name, please.
—SA
Christopher Smit 11-Aug-14 17:06pm    
The listbox control where users can select an item from the list of items. Its just marked as "ListBox" under "Common Controls" in Visual Studio. I figured that would be the best way to display the list of birthdays?
Dave Kreskowiak 11-Aug-14 18:14pm    
He meant what type of app are you writing? Windows Forms, WPF, ASP.NET, ....???
Christopher Smit 12-Aug-14 12:33pm    
Oh Sorry.. I'm writing a Winform. Don't have much knowledge on the WPF.
[no name] 11-Aug-14 17:26pm    
http://www.bing.com/search?q=c%23+owner+draw+listbox

1 solution

Short answer:

You are either using something like
System.Windows.Forms.ListView (Windows Forms) OR
Windows.UI.Controls.ListView (WPF)

For someone like me with many years of experience with both, in terms of difficulty, planning, and time required:

Windows Forms is more difficult and would take 4-8 hours for something well built. Look up overriding OnPaint

WPF is half of that. Look up customization of control templates.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900