From 8ff2136e108f43a67b6237a1e643d7961fdec36b Mon Sep 17 00:00:00 2001
From: chylex <info@chylex.com>
Date: Sun, 5 Apr 2015 18:53:04 +0200
Subject: [PATCH] Set directory textbox to invalid state if the content is
 invalid

---
 BackupEssentials/Pages/BackupLocationsEdit.xaml.cs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BackupEssentials/Pages/BackupLocationsEdit.xaml.cs b/BackupEssentials/Pages/BackupLocationsEdit.xaml.cs
index 68d3657..5a2d99a 100644
--- a/BackupEssentials/Pages/BackupLocationsEdit.xaml.cs
+++ b/BackupEssentials/Pages/BackupLocationsEdit.xaml.cs
@@ -43,6 +43,7 @@ namespace BackupEssentials.Pages{
                 else if (status == BackupLocation.DirectoryStatus.NotExists)warning = "Selected directory does not exist, it will be created when a first backup is made.";
 
                 if (warning.Length != 0){
+                    VisualStateManager.GoToState(TextBoxDirectory,"Invalid",true);
                     LastWarningDirectory = EditLocation.Directory;
                     System.Windows.MessageBox.Show(warning+" Click Save again to confirm.","Caution!",MessageBoxButton.OK,MessageBoxImage.Warning);
                     return;