using System;
using System.Collections;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Reflection;
if (state.Type.IsAmbient)
ambient_provider.Pop ();
+ else
+ HandleEndInit (obj);
object_states.Push (state);
if (object_states.Count == 1) {
state.IsInstantiated = true;
if (state.Type.IsAmbient)
ambient_provider.Push (new AmbientPropertyValue (CurrentMember, state.Value));
+ HandleBeginInit (state.Value);
}
protected override void OnWriteValue (object value)
state.IsInstantiated = true;
if (state.Type.IsAmbient)
ambient_provider.Push (new AmbientPropertyValue (CurrentMember, obj));
+ else
+ HandleBeginInit (obj);
}
internal IXamlNameResolver name_resolver {
}
}
}
+
+ void HandleBeginInit (object value)
+ {
+ var si = value as ISupportInitialize;
+ if (si == null)
+ return;
+ si.BeginInit ();
+ source.OnAfterBeginInit (value);
+ }
+
+ void HandleEndInit (object value)
+ {
+ var si = value as ISupportInitialize;
+ if (si == null)
+ return;
+ si.EndInit ();
+ source.OnAfterEndInit (value);
+ }
}
}