private void EditLineItem(object sender, ItemClickEventArgs e) { var lineItem = e.ClickedItem as BusinessLibrary.LineItem; if (lineItem != null) { var uc = new LineItemEditor(sender, lineItem); uc.Closed += (o, a) => { SaveCancelRegion.Visibility = Windows.UI.Xaml.Visibility.Visible; }; SaveCancelRegion.Visibility = Windows.UI.Xaml.Visibility.Collapsed; uc.Show(); } }