((IDataTemplate)dt).LoadTemplate = () => {
#pragma warning restore 0612
var cnode = node.Clone();
- var context = new HydrationContext { ParentContext = Context, RootElement = Context.RootElement };
+ var context = new HydrationContext { ParentContext = Context, RootElement = Context.RootElement, ExceptionHandler = Context.ExceptionHandler };
cnode.Accept(new XamlNodeVisitor((n, parent) => n.Parent = parent), node.Parent); //set parents for {StaticResource}
cnode.Accept(new ExpandMarkupsVisitor(context), null);
cnode.Accept(new NamescopingVisitor(context), null);