What exactly mean by this Urikind.relative

What i am doing is i will have a datagridview when i select a row and click on show button i would like to display the image along with some information for that i written the following code

public partial class WpfWindow : Window
{
    private UCPersons _ucPersons;

    public WpfWindow()
    {
        InitializeComponent();

        // Create WinForms Usercontrol and 
        // add it to the WindowsFormsHost
        _ucPersons = new UCPersons();
        winFormHost.Child = _ucPersons;

        List<Person> persons = CreateSamplePersons();
        _ucPersons.SetData(persons);


    }

    private List<Person> CreateSamplePersons()
    {
        List<Person> persons = new List<Person>();
        persons.Add(Person.Create("Dorababu", "Madhuranagar", "Hyd", 
            DateTime.Now.AddYears(-34), "1"));

        persons.Add(Person.Create("Krish", "Sat", "RJY",
            DateTime.Now.AddYears(-64), "2"));


        return persons;
    }

    private void btnDisplayDetails_Click(object sender, RoutedEventArgs e)
    {
        Person person = _ucPersons.GetSelectedPerson();
        if (person != null)
        {
            lblName.Content = person.Name;
            lblAge.Content = person.BirthDay.ToShortDateString();
            Uri uri = new Uri( "m_" + person.ImageRef + ".jpg", 
                UriKind.Relative);
            imgPerson.Source = BitmapFrame.Create(uri);
        }
    }
}

But the same is not working if i copy and paste my images out of Bin.

So i would like to know some thing about this UriKInd

8
задан Dorababu Meka 9 March 2011 в 07:06
поделиться