/// <summary> /// /// </summary> /// <param name="id"></param> private void LoadEducationalLevels(long id) { WrapPanelEducationaLevel.Children.Clear(); List <long> childrenIDs = _contentManager.GetChildrenIDs(id); if (childrenIDs != null) { foreach (int childID in childrenIDs) { EducationalLevel level = _contentManager.GetComponent(childID) as EducationalLevel; Image image = new Image() { Source = new BitmapImage(new Uri(level.Icon)), RenderSize = new Size(100, 100), MaxHeight = 100, MaxWidth = 100, Margin = new Thickness(15), Opacity = 0.5, Visibility = Visibility.Visible, Name = "Icon_" + level.ID }; image.MouseUp += delegate(object sender, MouseButtonEventArgs args) { ImageEducationaLevel_Click(sender as Image); }; _educationalLevelDictionary[image.Name] = childID; WrapPanelEducationaLevel.Children.Add(image); _selectedEducationalLevel = image; } } WrapPanelGrades.Children.Clear(); NoOfLessons.Text = "0"; NoOfFiles.Text = "0"; NoOfWeeks.Text = "0"; }