internal void RegisterKeyItem (XamlObjectElement element, XamlElement target, string key)
{
IDictionary rd = CurrentDictionary (element);
if (rd == null)
throw ParseException ("Attempt to use x:Key outside of an IDictionary.");
element.X_Key = key;
}