Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Fix AutoCompleteManager's ResourceDictionary loading #102

Merged
merged 2 commits into from
Aug 20, 2019
Merged

Fix AutoCompleteManager's ResourceDictionary loading #102

merged 2 commits into from
Aug 20, 2019

Conversation

wgnf
Copy link
Contributor

@wgnf wgnf commented Aug 20, 2019

Previously the ResourceDictionary for the ListBox was added every single time the AutoCompleteManager was initialized, because the FindName Method of a ResourceDictionary was used. According to Microsoft's Documentation:
https://docs.microsoft.com/de-de/dotnet/api/system.windows.resourcedictionary.findname?view=netframework-4.8
This Method always returns null, because Keys are used in a Dictionary. That's why this piece of code was faulty.


I've chagned this particular usage to "Contains" which uses the default Dictionary-approach.
This also fixes a rare edge-case for me, where the private variable "_resizeGrip" would not be initialized and so will result in some NullReferenceExceptions

wgnf added 2 commits August 20, 2019 08:53
Previously the Resource-Dictionary was every single time the "AutoCompleteManager" was initialized, because the "FindName" Method of a ResourceDictionary was used. According to Microsoft's Documentation: 
https://docs.microsoft.com/de-de/dotnet/api/system.windows.resourcedictionary.findname?view=netframework-4.8
This Method always returns null, because Keys are used in a Dictionary. That's why this piece of code was faulty.
@htochenhagen htochenhagen merged commit 5f0b656 into awesome-inc:master Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants