The Pic property should be the type of URI not string
public Uri Pic { get; set; }
and
public Transaction(String Name, String Surname, String Number, int Gender)
{
this.Name = Name;
this.Surname = Surname;
this.Number = Number;
this.Gender = Gender;
switch (Gender)
{
case 0:
this.Pic = new Uri("Images/man.png", UriKind.Relative);
break;
case 1:
this.Pic = new Uri("Images/woman.png", UriKind.Relative);
break;
default:
this.Pic = new Uri("Images/unknown.png", UriKind.Relative);
break;
}
}
xaml
<Image Margin="2" Width="80" Height="80" Stretch="Fill" Style="{Binding}" >
<Image.Source>
<BitmapImage UriSource="{Binding Pic}" />
</Image.Source>
</Image>