void fillAwards(UserSearchDTO user) { var green = Achievements.GetGreenStar(user); var red = Achievements.GetRedStar(user); var blue = Achievements.GetBlueStar(user); var awards = new ObservableCollection <AwardViewModel>(); awards.Add(new AwardViewModel(AchievementsHelper.GetWPFIconForRedStar(red), AchievementsHelper.GetStarToolTip(AchievementsHelper.CategorySportName, red))); awards.Add(new AwardViewModel(AchievementsHelper.GetWPFIconForBlueStar(blue), AchievementsHelper.GetStarToolTip(AchievementsHelper.CategoryFamousName, blue))); awards.Add(new AwardViewModel(AchievementsHelper.GetWPFIconForGreenStar(green), AchievementsHelper.GetStarToolTip(AchievementsHelper.CategorySocialName, green))); lstAwards.ItemsSource = awards; grAwards.SetVisible(red != AchievementStar.None || blue != AchievementStar.None || green != AchievementStar.None); //var blueStar = AchievementsHelper.GetIconForBlueStar(blue); //var greenStar = AchievementsHelper.GetIconForGreenStar(green); //if (redStar != null || blueStar != null || greenStar != null) //{ // picRedStar.Image = redStar; // picBlueStar.Image = blueStar; // picBlueStar.Visible = blueStar != null; // picRedStar.Visible = redStar != null; // picGreenStar.Image = greenStar; // picGreenStar.Visible = greenStar != null; // ControlHelper.AddSuperTip(toolTipController1, picGreenStar, null, AchievementsHelper.GetStarToolTip(string.Format("<b>{0}</b>", AchievementsHelper.CategorySocialName), green)); // ControlHelper.AddSuperTip(toolTipController1, picBlueStar, null, AchievementsHelper.GetStarToolTip(string.Format("<b>{0}</b>", AchievementsHelper.CategoryFamousName), blue)); // ControlHelper.AddSuperTip(toolTipController1, picRedStar, null, AchievementsHelper.GetStarToolTip(string.Format("<b>{0}</b>", AchievementsHelper.CategorySportName), red)); // grAwards.Visible = true; //} //else //{ // grAwards.Visible = false; //} //grAwards.SetVisible(Awards.Count > 0); }