© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
Gipper

❔ Anyone knows how to have a "default value" in a ComboBox?

I mean like before even clicking the button to open the scroll-down menu, already having some text written down in there...Something like "Please Select" or maybe the last option in the ComboBox selected...
And if you google it and find a StackOverflow thread where they explain how to do it, that doesn't work for me cause I'm doing it by creating a list of strings in the code that's behind the XAML with the strings that will show up as options in the ComboBox whereas they're doing it all directly in the XAML which if I do it in the "behind" code and also put stuff inside the
<ComboBox/>
<ComboBox/>
tag it will throw up an exception, and I don't know how to put all the data directly in the XAML...
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ ComboBox | When in ComboBox1 "A" selected then show in combobox2 "B"
C#CC# / help
3y ago
Anyone knows how to code a Color Syntax?
C#CC# / help
16mo ago
✅ How to Retrieve the Selected Item Value from a ComboBox in C# (AvaloniaUI)
C#CC# / help
3y ago