This is a migrated thread and some comments may be shown as answers.

Error with Vista Theme

1 Answer 99 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
joshua odell
Top achievements
Rank 1
joshua odell asked on 18 Jan 2010, 03:04 PM
Hello

In the new release (2009.3.1314.35) setting the default theme to Vista 

StyleManager.ApplicationTheme = new VistaTheme(); 

I am getting the following error when the window loads.

System.NullReferenceException was unhandled by user code 
  Message="Object reference not set to an instance of an object." 
  Source="PresentationFramework" 
  StackTrace: 
       at System.Windows.StyleHelper.UpdateTables(PropertyValue& propertyValue, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildName, Boolean& hasInstanceValues) 
       at System.Windows.StyleHelper.ProcessTemplateContent(FrameworkTemplate frameworkTemplate, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildID, Boolean& hasInstanceValues) 
       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.StyleHelper.SealIfSealable(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 Telerik.Windows.Controls.RadTabControl.OnLeftTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 2371 
       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, 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.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, OperationType operationType) 
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
       at System.Windows.FrameworkElement.set_DefaultStyleKey(Object value) 
       at Telerik.Windows.Controls.RadTabControl.SetDefaultStyleKey() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1336 
       at Telerik.Windows.Controls.RadTabControl.OnInitialized(EventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1346 
       at System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element) 
  InnerException:  
 

All the other themes are working properly, only the Vista theme is not working.
I can supply the xaml taht I'm using if necessary, but I'm not doing any styling at all, just taking the stylemanager's theme.


Joshua

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 20 Jan 2010, 02:19 PM
Hi joshua,

Unfortunately, we were not able to reproduce the error you've encountered. Please, find the attached file and compare it with your project. If you have further questions please do not hesitate to ask us.

I hope this will help you.

Regards,
Dimitrina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TabControl
Asked by
joshua odell
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or