Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Expander > Cannot freeze this Storyboard timeline tree for use across threads.

Not answered Cannot freeze this Storyboard timeline tree for use across threads.

Feed from this thread
  • Shawn avatar

    Posted on Sep 21, 2011 (permalink)

    I'm trying to figure out a good way to get a theme applied at design time. I followed someones suggestion to create a class like this and added it to the resources in my App.xaml.
    public class TelerikThemeManager : DependencyObject
    {
        public TelerikThemeManager()
        {
            StyleManager.ApplicationTheme = new MetroTheme();
        }
    }

    I'm getting this error with RadExpander when i have that in place. The (few) other controls seem to be fine. Is there a good way of getting design time theme support application wide?

    Cannot freeze this Storyboard timeline tree for use across threads.
       at System.Windows.Media.Animation.BeginStoryboard.Seal()
       at System.Windows.TriggerAction.Seal(TriggerBase containingTrigger)
       at System.Windows.TriggerActionCollection.Seal(TriggerBase containingTrigger)
       at System.Windows.TriggerBase.Seal()
       at System.Windows.Trigger.Seal()
       at System.Windows.TriggerCollection.Seal()
       at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore)
       at System.Windows.FrameworkTemplate.Seal()
       at System.Windows.FrameworkTemplate.System.Windows.ISealable.Seal()
       at System.Windows.StyleHelper.SealIfSealable(Object value)
       at System.Windows.ResourceDictionary.SealValue(Object value)
       at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource)
       at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue()
       at System.Windows.Controls.Control.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
       at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
       at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style)
       at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache)
       at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object newValue)
       at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
       at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
       at System.Windows.FrameworkElement.OnThemeStyleKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.RadExpander.SetDefaultStyleKey() in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 577
       at Telerik.Windows.Controls.RadExpander.OnInitialized(EventArgs e) in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 571
       at System.Windows.FrameworkElement.TryFireInitialized()
       at System.Windows.FrameworkElement.EndInit()
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.EndInit(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, ISupportInitialize supportInitialize)
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateProperties(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode)
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkElementInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at MS.Internal.Services.DesignModeValueProviderService.DesignModeValueProviderBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

    Reply

  • Shawn avatar

    Posted on Sep 22, 2011 (permalink)

    I finally resolved this by uninstalling the controls and re installing them.

    Reply

  • Posted on Dec 2, 2011 (permalink)

    I'm using version 2011.2.912.40. Project references binaries that are stored in a solution folder, not the ones in the GAC. How Can I fix this error?

    Reply

  • Posted on Dec 2, 2011 (permalink)

    More details:
    Turns out I only get this error when I set the theme to Metro. The application uses Office_Blue globally via StyleManager.ApplicationTheme but I'm overriding it in certain areas of my application using StyleManager.Theme attached property. I can pick any theme but the Metro theme. And I've only encountered this error on the Expander.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Dec 7, 2011 (permalink)

    Hi Rayne,

     Could you please elaborate more on your scenario, especially what types of controls do you use? We tried to isolate this issue in a sample project but we did not succeed as you can see in the attached project. Is it possible for you to open a new support ticket with a project attached so that we would be able to investigate it locally ? Thank you in advance.

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Posted on Dec 7, 2011 (permalink)

    I was able to reproduce the problem in a sample application using the dlls my project references. Then I upgraded the sample project to the latest version that I have downloaded (2011.3.1129.40) and it works as expected. So maybe there is a problem with the version of the controls I'm using. When possible, I will update my project dlls and test again.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Expander > Cannot freeze this Storyboard timeline tree for use across threads.
Related resources for "Cannot freeze this Storyboard timeline tree for use across threads."

WPF Expander Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]