diff --git a/NZazu/Fields/Libs/AutoCompleteManager.cs b/NZazu/Fields/Libs/AutoCompleteManager.cs index 52ecf12..ad18d81 100644 --- a/NZazu/Fields/Libs/AutoCompleteManager.cs +++ b/NZazu/Fields/Libs/AutoCompleteManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -99,7 +99,7 @@ public void AttachTextBox(TextBox textBox) if (Application.Current == null) return; // because we are in testing - if (Application.Current.Resources.FindName("AcTb_ListBoxStyle") == null) + if (!Application.Current.Resources.Contains("AcTb_ListBoxStyle")) { var myResourceDictionary = new ResourceDictionary(); // TODO: hard coded namespace. this can break on namespace changes! avoid that! @@ -702,4 +702,4 @@ private void UpdateText(string text, bool selectAll) #endregion } -} \ No newline at end of file +}