MMCCPaulEden Posted May 23, 2008 Report Share Posted May 23, 2008 Hi When I attempt to set the template of a chart to change it to a cylinder 3d bar chart via .AllSeries.Template = DirectCast(FindResource("Cylinder"), DataTemplate) , the following exception occurs: System.NullReferenceException was caught Message="Object reference not set to an instance of an object." Source="ChartFX.WPF" StackTrace: at ChartFX.WPF.Chart.ChartFX.WPF.Internal.IAmbient.CleanupChildAttributes(DependencyProperty childDP, DependencyProperty dp) at ChartFX.WPF.Internal.ChildAttributes.a(DependencyObject A_0, DependencyPropertyChangedEventArgs A_1) at System.Windows.PropertyChangedCallback.Invoke(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkContentElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at ChartFX.WPF.AllSeriesAttributes.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 ChartFX.WPF.SeriesAttributes.set_Template(DataTemplate value) at NTO.ctrlAnalysis.AddAxiomToAxiomCharts(Int32 pPrimaryHeirarchyLevel, Int32 pSubHeirarchyLevel, DiagramNode pParentNode, String pWhereClause, String pSubWhereClause, String pAxiomName, String pSubAxiomName, List`1 pHeirarchyLevels, List`1 pSubHeirarchyLevels) in C:\Users\Neutrino_1\Documents\Projects\Neutrino\OBM\UI\ctrlAnalysis.xaml.vb:line 844 InnerException: Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted May 28, 2008 Author Report Share Posted May 28, 2008 This is a thread bump as, having upgraded to 0.8.3065.20832, there are still issues with applying 3d templates. This time the issue resides in the resource XAML taken from the sample application where 'X' 'Y' and 'Z' are not found in the type Cylinder: <DataTemplate x:Key="Cylinder"> <cfx3d:Cylinder Cap="Both" X="{Binding Path=X}" Y="{Binding Path=Y}" Width="{Binding Path=W}" Height="{Binding Path=H}" Depth="{Binding Path=W}" Z="{Binding Path=Z}" Material="{Binding Path=View3D.Material}" BackMaterial="{Binding Path=View3D.Material}"/> </DataTemplate> Many thanks Paul Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 28, 2008 Report Share Posted May 28, 2008 Property names for both our 3D objects and the logical items they are bound to were changed as follows Left="{Binding Path=Left}" Top="{Binding Path=Top}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Depth="{Binding Path=Depth}" Front="{Binding Path=Front}" Regards, JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted May 29, 2008 Author Report Share Posted May 29, 2008 Hi That fixed it. Many thanks Paul Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.