if (!state.Type.IsContentValue (service_provider))
InitializeObjectIfRequired (true);
-
+ state.IsXamlWriterCreated = true;
+ source.OnBeforeProperties (state.Value);
}
protected override void OnWriteGetObject ()
throw new XamlObjectWriterException ("An error occured on getting provided value", ex);
}
}
+
+ // call this (possibly) before the object is added to parent collection. (bug #3003 also expects this)
+ if (state.IsXamlWriterCreated)
+ source.OnAfterProperties (obj);
+
var nfr = obj as NameFixupRequired;
if (nfr != null && object_states.Count > 0) { // IF the root object to be written is x:Reference, then the Result property will become the NameFixupRequired. That's what .NET also does.
// actually .NET seems to seek "parent" object in its own IXamlNameResolver implementation.
//
// Copyright (C) 2010 Novell Inc. http://novell.com
+// Copyright (C) 2012 Xamarin Inc. http://xamarin.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
public object KeyValue;
public List<MemberAndValue> WrittenProperties = new List<MemberAndValue> ();
public bool IsInstantiated;
+ public bool IsXamlWriterCreated; // affects AfterProperties() calls.
}
internal class MemberAndValue