public override object CreateObjectFromFile (string file, bool createNamescope)
{
if (file == null)
throw new ArgumentNullException ("file");
IntPtr top;
object result;
Kind kind;
DependencyObject.Initialize ();
top = CreateFromFile (file, createNamescope, out kind);
if (top == IntPtr.Zero)
return null;
try {
result = Value.ToObject (null, top);
} finally {
NativeMethods.value_delete_value2 (top);
}
return result;
}