wpf - Binding errors on ContentControl after changing Content before ContentTemplate is applied -
i'm having annoying issue not causing problems, generating ton of binding errors unnecessarily.
i've tracked problem down fact setting content on contentcontrol changes datacontext of content before applies new contenttemplate. since new content not of same type old contenttemplate expects, generates binding errors old contenttemplate.
here's how have contentcontrol set up. content bound viewmodel selected tab, , contenttemplate bound datatemplate view tab. used have using contenttemplateselector instead of converter contenttemplate, had same issues tried instead.
<contentcontrol content="{binding selectedtab, converter={staticresource configurationviewmodelconverter}}" contenttemplate="{binding selectedtab, converter={staticresource configurationtemplateconverter}}"/>
perhaps i've got wired wrong somehow working exception of binding errors when switching tabs, seemingly due content , contenttemplate getting briefly out of sync. in advance assistance.
Comments
Post a Comment