Whenever I change themes at runtime by changing the ThemeManager.CurrentTheme property I get a null reference exception (stack trace below). The first time I change it, it works fine, but every subsequent time it fails. Is there something more I need to be doing than just setting that property?
Also, even running the sample posted by Alex in this thread http://community.infragistics.com/forums/p/37459/224447.aspx I get an exception when I change the theme.
at System.Windows.DeferredResourceReference.RemoveInflatedListener(ResourceReferenceExpression listener) at System.Windows.ResourceReferenceExpression.InvalidateCacheValue() at System.Windows.ResourceReferenceExpression.InvalidateExpressionValue(Object sender, EventArgs e) at System.Windows.TreeWalkHelper.InvalidateResourceReferences(DependencyObject d, ResourcesChangeInfo info) at System.Windows.TreeWalkHelper.OnResourcesChanged(DependencyObject d, ResourcesChangeInfo info, Boolean raiseResourceChangedEvent) at System.Windows.TreeWalkHelper.OnResourcesChangedCallback(DependencyObject d, ResourcesChangeInfo info) at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode) at System.Windows.TreeWalkHelper.InvalidateOnResourcesChange(FrameworkElement fe, FrameworkContentElement fce, ResourcesChangeInfo info
I know that MS introduced a bug like that when they fixed a memory leak in the WPF framework relating to using DynamicResources and I believe it started showing up either with Vista SP2 or some updates that they published around that time. I would recommend getting the latest updates from MS and if you still get the problem to contact their support group.
That must be the problem, I just tried running the application on an XP machine and it worked fine.
Thanks