Value cannot be infinite or NaN, JumpList with Panorama project

Thread is closed for posting
4 posts, 0 answers
  1. EFREN
    EFREN avatar
    2 posts
    Member since:
    Mar 2011

    Posted 03 Mar 2011 Link to this post

    I use the JumpList control with Windows Phone Panorama Application project template in VS 2010, when I add the JumpList to render de sample data from MainViewModel a exception is raising "Value cannot be infinite or NaN. Parameter name: System.Windows.CustomDependencyProperty"

    To reproduce only create a "Windows Phone Panorama Application" template and add JumpList to second panorama tab with ItemSource property to "Items"

    Telerik Controls to Windows Phone 7 are download from your post: "RadJumpList Introduction and simple usage"

    I have Windows Phone Developer Tools January 2011 Update release with copy and paste functionality

    My xaml




    <phone:PhoneApplicationPage x:Class="TestControls.MainPage"



    xmlns =""


    xmlns:x =""


    xmlns:phone ="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"


    xmlns:shell ="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"


    xmlns:controls ="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"


    xmlns:d =""




    xmlns:telerikData ="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"


    xmlns:telerikDataControls ="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data"


    xmlns:telerikPrimitives ="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"


    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"


    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"


    FontFamily="{StaticResource PhoneFontFamilyNormal}"


    FontSize="{StaticResource PhoneFontSizeNormal}"


    Foreground="{StaticResource PhoneForegroundBrush}"


    SupportedOrientations="Portrait" Orientation="Portrait"


    shell:SystemTray.IsVisible ="False">


    <!--LayoutRoot is the root grid where all page content is placed-->


    <Grid x:Name="LayoutRoot" Background ="Transparent">




    <Style TargetType="telerikPrimitives:RadDataBoundListBoxItem" x:Key="ItemContainerStyle">


    <Setter Property="HorizontalContentAlignment" Value ="Stretch"/>




    <DataTemplate x:Name ="JumpListItemTemplate">


    <Grid Margin ="0, 10, 0, 8">


    <Grid.ColumnDefinitions >


    <ColumnDefinition Width ="Auto"/>


    <ColumnDefinition Width ="*"/>


    </Grid.ColumnDefinitions >


    <!--<Image Source="{Binding Bitmap}" Grid.Row="0" Stretch="None" HorizontalAlignment="Left" VerticalAlignment="Top"/>-->


    <Grid Grid.Column="1" Margin ="15, 0, 0, 0">




    <RowDefinition Height ="Auto"/>


    <RowDefinition Height ="Auto"/>


    </Grid.RowDefinitions >


    <TextBlock Text="{Binding RouteNumber}" FontSize="16" FontWeight="Bold" Grid.Row="0" TextWrapping



    <StackPanel Orientation="Horizontal" Grid.Row ="1">


    <Image Source="Images/star.png" HorizontalAlignment="Center" VerticalAlignment ="Center"/>


    <TextBlock Text="{Binding LineTwo}" FontSize="15" VerticalAlignment="Center" FontWeight="SemiBold" Margin="8, 0, 8, 0" Foreground ="#0795B9"/>


    <Border BorderThickness="1" Background="Transparent" BorderBrush="{StaticResource PhoneSubtleBrush}" Margin="0, 3, 0, 3" Padding ="2, 1, 2, 1">


    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding LineThree}" Foreground="{StaticResource PhoneSubtleBrush}" FontFamily="Georgia" FontWeight="Bold" FontSize















    <!--Panorama control-->


    <controls:Panorama Title ="my application">




    <ImageBrush ImageSource ="PanoramaBackground.png"/>


    </controls:Panorama.Background >


    <!--Panorama item one-->


    <controls:PanoramaItem Header ="first item">


    <!--Double line list with text wrapping-->


    <ListBox Margin="0,0,-12,0" ItemsSource="{Binding Items}">






    <StackPanel Margin="0,0,0,17" Width ="432">


    <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle



    <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>












    <!--Panorama item two-->


    <controls:PanoramaItem Header ="second item">


    <StackPanel Orientation ="Vertical">




    ItemTemplate="{StaticResource JumpListItemTemplate}"


    ItemsSource="{Binding Items}"


    ItemContainerStyle="{StaticResource ItemContainerStyle}" >


    <!-- Group by LineOne -->




    <telerikData:PropertyGroupDescriptor PropertyName="LineOne"/>




    <!-- Sort by LineTwo -->




    <telerikData:PropertySortDescriptor PropertyName ="LineTwo"/>














    <!--Panorama-based applications should not show an ApplicationBar-->







    StackTrace property is "   at System.Windows.Controls.Primitives.RangeBase.OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, Double d)
       at System.Windows.Controls.Primitives.RangeBase.set_Maximum(Double value)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.UpdateScrollParams()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.BalanceVisualSpace()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnCollectionReset()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadDataBoundListBox.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnListSource_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadListSource.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadListSource.RefreshOverride()
       at Telerik.Windows.Data.RadCollectionViewSource.RefreshOverride()
       at Telerik.Windows.Data.RadListSource.Refresh()
       at Telerik.Windows.Data.RadCollectionViewSource.SourceCollectionChangedOverride(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadListSource.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, ItemViewModel item)
       at System.Collections.ObjectModel.Collection`1.Add(ItemViewModel item)
       at TestControls.MainViewModel.LoadData()
       at TestControls.MainPage.MainPage_Loaded(Object sender, RoutedEventArgs e)
       at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)"

  2. Deyan
    Deyan avatar
    2147 posts

    Posted 07 Mar 2011 Link to this post

    Hello EFREN,

    Thanks for contacting us and for reporting this issue.

    We have tried to reproduce the case by using the steps that you provided but did not manage to reproduce the exception by using the Beta 2 assemblies. Could you please make sure that you are using RadControls for Windows Phone 7 Beta 2? We have introduced a fix for a similar problem in this version and therefore we would like to make sure in which version does the issue occur so that we perform additional investigations.

    It would be extremely helpful if you manage to provide us with a demo application that we can use to reproduce the case. This will help us isolate the problem and provide a fix for it.

    Please note that you will have to open a new support ticket in order to be able to upload the demo project.

    Thanks for your time and do not hesitate to get back to us in case you have further questions or need assistance.

    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. EFREN
    EFREN avatar
    2 posts
    Member since:
    Mar 2011

    Posted 08 Mar 2011 Link to this post

    You are right, Beta 2 solve the problem, but with this release I have other problem, when add a RadJumpList into a Panorama, RadJumpList doesn´t fit height area, always I need set Height property manually, with set Height property manually in my RadJumpList solve the problem.
  4. Deyan
    Deyan avatar
    2147 posts

    Posted 09 Mar 2011 Link to this post

    Hi EFREN,

    Thanks for getting back to us.

    Based on the XAML snippet that you sent me earlier I can assume that the RadJumpList control does not stretch to the height of the panorama item because it is put in a vertical StackPanel. The StackPanel measures its children with infinite space based on its orientation. Since the RadJumpList cannot give an exact height when put in a vertical StackPanel, it returns its minimum height which is 100 pixels. This is an expected behavior and is not a bug.

    If you wish the RadJumpList to stretch in the panorama item make it a direct child of the panorama item instead of using a StackPanel.

    I hope this helps.

    Do not hesitate to get back to me in case of further questions.

    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top