© 2026 Hedgehog Software, LLC

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

❔ Binding WPF Combobox

Hello,

I'm having trouble doing the Binding in WPF, I have a combobox and I want to show the image that I have saved in the images folder, and the name of the country.
I created a separate class just for ImagePath and Text, and I tried to do the Binding, but it doesn't work, does anyone have any tips on how to solve this?
And I am not using MVC.
public class Item
{
public string Name { get; set; }
public string ImagePath { get; set; }
}

<syncfusion:ComboBoxAdv x:Name="ComboBoxCountries" AllowMultiSelect="False" DefaultText="Countries List" Foreground="#333333" Height="35" Width="350" Margin="30,60,740,516"
ItemsSource="{Binding Template}"
SelectionChanged="ComboBoxCountries_SelectionChanged">
<syncfusion:ComboBoxItemAdv>

<StackPanel Orientation="Horizontal">
<Image Source="{Binding ImagePath}" Width="20"
Height="20"
Margin="0,0,5,0"/>
<TextBlock Text="{Binding Text}"/>
</StackPanel>

</syncfusion:ComboBoxItemAdv>
</syncfusion:ComboBoxAdv>
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

Wpf combobox
C#CC# / help
2y ago
WPF: Binding selected item of ComboBox inside ItemsControl
C#CC# / help
15mo ago
Wpf combobox problem
C#CC# / help
2y ago
WPF binding
C#CC# / help
13mo ago