/** * with this the show and hide can work */ private void Update(InspectionEquipmentFeedback item) { var index = EquipmentFeedbackItems.IndexOf(item); EquipmentFeedbackItems.Remove(item); EquipmentFeedbackItems.Insert(index, item); }
/** * this shows or hide the extra information */ private void HideOrShowDetails() { if (oldItem == SelectedItem) { SelectedItem.IsVisible = !SelectedItem.IsVisible; Update(SelectedItem); } else { if (oldItem != null) { oldItem.IsVisible = false; Update(oldItem); } SelectedItem.IsVisible = true; Update(SelectedItem); } oldItem = SelectedItem; }