private void editpath_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { CancelEditMode(); Path = editpath.Text; } }