Hi,
I'm using a TileView and have a RadHorizontalBulletGraph that I only display when the TileView item is in the maximized state. When I maximize an item, the bullet graph displays correctly, but when I go to minimize the item, I get a NullReferenceException. There's not much of a stack trace, but here it is:
at System.Windows.StyleHelper.FindNameInTemplateContent(DependencyObject container, String childName, FrameworkTemplate frameworkTemplate)
at System.Windows.TemplateNameScope.System.Windows.Markup.INameScope.FindName(String name)
at System.Windows.FrameworkElement.FindName(String name)
at Telerik.Windows.Controls.ChildrenOfTypeExtensions.GetChildByName(FrameworkElement element, String name) in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Controls\Extensions\ChildrenOfTypeExtensions.cs:line 42
at Telerik.Windows.Controls.BulletGraph.RadBulletGraphBase.ToggleAxis() in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Controls\DataVisualization\BulletGraph\Base\RadBulletGraphBase.cs:line 925
at Telerik.Windows.Controls.BulletGraph.RadBulletGraphBase.SynchronizeFeaturedMeasures() in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Controls\DataVisualization
Here's a simplified version of my XAML. Any ideas?
I'm using a TileView and have a RadHorizontalBulletGraph that I only display when the TileView item is in the maximized state. When I maximize an item, the bullet graph displays correctly, but when I go to minimize the item, I get a NullReferenceException. There's not much of a stack trace, but here it is:
at System.Windows.StyleHelper.FindNameInTemplateContent(DependencyObject container, String childName, FrameworkTemplate frameworkTemplate)
at System.Windows.TemplateNameScope.System.Windows.Markup.INameScope.FindName(String name)
at System.Windows.FrameworkElement.FindName(String name)
at Telerik.Windows.Controls.ChildrenOfTypeExtensions.GetChildByName(FrameworkElement element, String name) in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Controls\Extensions\ChildrenOfTypeExtensions.cs:line 42
at Telerik.Windows.Controls.BulletGraph.RadBulletGraphBase.ToggleAxis() in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Controls\DataVisualization\BulletGraph\Base\RadBulletGraphBase.cs:line 925
at Telerik.Windows.Controls.BulletGraph.RadBulletGraphBase.SynchronizeFeaturedMeasures() in c:\TB\117\WPF_Scrum\Release_WPF_40\Sources\Development\Controls\DataVisualization
Here's a simplified version of my XAML. Any ideas?
<DataTemplate x:Key="MachineTileLarge"><Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <telerik:RadHorizontalBulletGraph Grid.Row="1" Maximum="100" ComparativeMeasureBrush="CornflowerBlue" FeaturedMeasureBrush="SeaGreen" ComparativeMeasure="32" FeaturedMeasure="75" /></Grid></DataTemplate>
<DataTemplate x:Key="MachineTemplate">
<telerik:RadFluidContentControl ContentChangeMode="Manual" TransitionDuration="0:0:.5"
State="{Binding State, Converter={StaticResource tileConverter}}"
SmallContentTemplate="{StaticResource MachineTileSmall}"
ContentTemplate="{StaticResource MachineTileNormal}"
LargeContentTemplate="{StaticResource MachineTileLarge}" />
</DataTemplate>
<Style TargetType="telerik:RadTileView">
<Setter Property="PreservePositionWhenMaximized" Value="True" />
<Setter Property="telerik:TileViewPanel.IsVirtualized" Value="True" />
<Setter Property="IsAutoScrollingEnabled" Value="True" />
<Setter Property="TileStateChangeTrigger" Value="SingleClick" />
<Setter Property="MinimizedColumnWidth" Value="200" />
<Setter Property="MinimizedRowHeight" Value="225" />
<Setter Property="RowHeight" Value="330" />
<Setter Property="ColumnWidth" Value="290" />
<Setter Property="ContentTemplate" Value="{StaticResource MachineTemplate}" />
<Setter Property="ItemTemplate" Value="{StaticResource MachineTileHeader}" />
</Style>
<telerik:RadTileView ItemsSource="{Binding Path=MachineStatusItems}"
TileStateChanged="tileView_TileStateChanged"
TileStateChangeTrigger="SingleClick"
MaximizeMode="ZeroOrOne"
IsItemDraggingEnabled="True"
PreservePositionWhenMaximized="True"/>