public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null) { var mapping = new DeferredLoaderMapping(); mapping.Map<XamlDataTemplate>(template => template.Content, new TemplateLoader()); var assembler = new ObjectAssembler(wiringContext, new TopDownMemberValueContext(), objectAssemblerSettings); _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping); }
public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null) { var mapping = new DeferredLoaderMapping(); mapping.Map<ControlTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<DataTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<FocusAdornerTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<TreeDataTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<ItemsPanelTemplate>(x => x.Content, new TemplateLoader()); var assembler = new ObjectAssembler(wiringContext, new TopDownValueContext(), objectAssemblerSettings); _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping); }
public PerspexObjectAssembler( IRuntimeTypeSource typeSource, ITopDownValueContext topDownValueContext, Settings settings = null) { var mapping = new DeferredLoaderMapping(); mapping.Map<ControlTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<DataTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<FocusAdornerTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<TreeDataTemplate>(x => x.Content, new TemplateLoader()); mapping.Map<ItemsPanelTemplate>(x => x.Content, new TemplateLoader()); var valueContext = new ValueContext(typeSource, topDownValueContext); assembler = new ObjectAssembler(typeSource, valueContext, settings); objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping); }