private void OpenFuncProperties(object sender, RoutedEventArgs e) { ListViewFunction item = (ListViewFunction)FunctionsView.SelectedItem; Function f = item.Details; FunctionProperties fp = new FunctionProperties(f); fp.ShowDialog(); }