I after I created an instance of customerService object during user control loaded event, Image is not showing up, I have no ideal can some one assist me. Name value are showing up , but the images are not showing up, can someone help me.
public class CustomerService
{
///
/// method returns a collection of customers
///
///
public static List
{
return new List
{
new CustomerManager{
Name="Keith",
ImageSource="Images/men.png",
},
new CustomerManager
{
Name="Tina",
ImageSource="Images/woman.png",
},
};
}
}
public partial class TestControl : UserControl
{
List
public TestControl()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(TestControl_Loaded);
}
void TestControl_Loaded(object sender, RoutedEventArgs e)
{
/lbCustomer.ItemsSource = from c in CustomerService.GetCustomers()
select new CustomerManager
{
ImageSource = c.ImageSource,
Name = c.Name,
};
}
}
-----------------------------------------------------------------------------------
Suthish NairPosted Nov 6, 2011, 10:50 AM
public ImageSource PictureURL { get; set; }
use PictureURL as object for binding..