public Profile() { var app = Application.Current as App; appointmentController = app.appointmentController; articleController = app.articleController; InitializeComponent(); License.Text = MainWindow.doctor.LicenseNumber; // ProfilePic.Source = MainWindow. var dr = MainWindow.doctor; Name.Text = MainWindow.doctor.Name + " " + MainWindow.doctor.Surname; if (dr.ProfileImage != null) { ProfilePic.Source = new BitmapImage(new Uri(dr.ProfileImage, UriKind.Relative)); } DateOfBirth.Text = dr.DateOfBirth.ToString("dd.MM.yyyy."); PlceOfBirth.Text = dr.PlaceOfBirth.Name; CurrentCity.Text = dr.CurrResidence.City.Name + ", " + dr.CurrResidence.City.State.Name; StateOfBirth.Text = dr.PlaceOfBirth.State.Name; IDNumber.Text = dr.IdentificationNumber; Address.Text = dr.CurrResidence.Street + ", " + dr.CurrResidence.Number.ToString(); Email.Text = dr.Email; PhoneNumber.Text = dr.Phone; Specialization.Text = dr.Specializations[0].SpecializationName; DoctorReview.Text = dr.PatientReview.ToString(); NumberOfExams.Text = appointmentController.GetNumberOfAppointmentsForDoctor(dr, TypeOfAppointment.examination).ToString(); NumberOfOperations.Text = appointmentController.GetNumberOfAppointmentsForDoctor(dr, TypeOfAppointment.surgery).ToString(); List <showArticle> articles = new List <showArticle>(); foreach (Article a in articleController.GetArticlesWroteByDoctor(dr)) { articles.Add(new showArticle() { show = "Naslov: " + a.PostContent.ContentTitle, article = new ModelHCI.ArticleHCI() { article = a, content = a.PostContent.Content, title = a.PostContent.ContentTitle, articlePic = new BitmapImage(new Uri(a.Image, UriKind.Relative)) } }); } Objave.ItemsSource = new List <showArticle>(); Objave.ItemsSource = articles; }