-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
enhancementhelp-wantedA contribution from the community would be most welcome.A contribution from the community would be most welcome.
Description
Currently, the AvaloniaDictionary class only provides two constructors, which limits the flexibility when initializing it with an existing dictionary. Often, developers have a ready-made Dictionary<TKey, TValue> that they wish to convert into an AvaloniaDictionary, but they lack a straightforward constructor for this purpose.
I propose adding a new constructor to the AvaloniaDictionary class that accepts an existing Dictionary<TKey, TValue>. This would simplify the process of converting an existing dictionary to an AvaloniaDictionary. The constructor would look like this:
public AvaloniaDictionary(Dictionary<TKey, TValue> initialDictionary)
{
_inner = new Dictionary<TKey, TValue>(initialDictionary);
}IoannTerrible, nailNumber6, loyvsc and maxkatz6
Metadata
Metadata
Assignees
Labels
enhancementhelp-wantedA contribution from the community would be most welcome.A contribution from the community would be most welcome.