I have most of the Label
objects in my app bound such that they can be replaced from a webservice.
I store my replacements in a Dictionary. The repla
If you have the option to, I would change your IDictionary
implementation to one that returns null
and instead use TargetNullValue
(or even be IDictionary
and return DependencyProperty.UnsetValue
if you still use FallbackValue
):
public class PassthruDictionary : IDictionary
{
private Dictionary instance;
// ... other stuff
public TValue this[TKey key]
{
get
{
TValue value;
if (instance.TryGetValue(key, out value))
{
return value;
}
else
{
return default(TValue);
}
}
// ... more
}
}