private static bool IsValidFileName(string newValue) { try { new FileInfo(newValue); } catch { return false; } return true; }