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

Issues with ScheduleView and TileView with Silverlight 5

3 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 17 Jan 2012, 08:39 PM
I have updated telerik to the silverlight 5 dlls and am having two issues so far:

1.) The FluidContentControl throws exception when changing state inside of a TileView. I have a fluidcontentcontrol with change content mode to manual, binding its state to the tile view using a converter. See the exception below.

2.) Randomly I get a Catastrophic error when ScheduleView loads. It seems to be some kind of a timing issue but I can consistently reproduce it when I have the Scheduleview inside of a tile view and I go from a minimized to a maximized state.

Thanks for your help!

Exception for FluidContentControl:
System.Windows.Data Error: ConvertBack cannot convert value 'Large' (type 'Telerik.Windows.Controls.FluidContentControlState'). BindingExpression: Path='State' DataItem='Telerik.Windows.Controls.RadFluidContentControl' (HashCode=3187035); target element is 'Rem.Ria.PatientModule.PatientDashboard.VitalsView' (Name=''); target property is 'TileState' (type 'Telerik.Windows.Controls.TileViewItemState').. System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.PrepareAnimation()
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.OnContentChanging(DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.OnContentChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
   at System.Windows.DependencyPropertyChangedWeakListener.SourcePropertyChanged(DependencyObject c, DependencyProperty dp)
   at System.Windows.DPChangedEventHandler.Invoke(DependencyObject sender, DependencyProperty dp)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyProperty dp)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyProperty dp)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.DependencyPropertyExtensions.SetValue(DependencyObject element, DependencyPropertyKey key, Object value)
   at Telerik.Windows.Controls.RadFluidContentControl.UpdateVisibleContent()
   at Telerik.Windows.Controls.RadFluidContentControl.OnStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at System.Windows.DependencyPropertyListener.set_Value(Object value)
   at System.Windows.PropertyAccessPathStep.set_Value(Object value)
   at System.Windows.Data.BindingExpression.UpdateValue(). 

3 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 20 Jan 2012, 06:06 PM
Hi Eric,

1. The TileView exception indicates that there is an issue in the ConvertBack logic of the converter you use when changing the state and content of the RadTileViewItems. However, without looking at your code, we cannot be sure what exactly is causing this issue. But you can examine this tutorial as it describes how to use the RadFluidContentControl along with the RadTileView control to implement an MVVM approach for dynamically changing the content of the tiles. It can help you find the cause for your issue. If it doesn't help, you can send us a ticket with a sample solution reproducing it so that we can further investigate the case.

2. We tested the issue but were not able to reproduce the error. Maybe as you said this is due to some timing issue if you are loading your appointments from a service. It will be great if you could send us a sample project where this can be reproduced. That will greatly help us in pinpoint the problem.

Regards,
Boyan
the Telerik team

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

0
Eric
Top achievements
Rank 1
answered on 20 Jan 2012, 07:03 PM
Thank you for your response:

For the first issue I probably jumped the gun in thinking it is a Silverlight 5 issue. It actually was an issue with a change you made in the transitioncontrol. With previous bits we overloaded the control template for the RadFluentContentControl where we were not setting the Host for the TransitionControl where with the current bits it seems that Host is required because in the Prepare for Animation method uses that Host without checking for null. You should easily be able to replicate this by overriding the template and not setting the host. It was an easy fix to set it but I would recommend trying to make it more clear when changing a control template what values need to be set. I know silverlight doesnt support TemplatedParts as nicely as WPF but it is definately a problem when upgrading controls in which you have changed the template.

Again I made a quick assumption with the second issue (this could still be a silverlight 5 issue but i don't know) this issue has nothing to do with the ScheduleViewer it again has to do with using the RadFluentContentControl in a TileView. The issue happens when setting the MinimizedRowHeight of the tileview. If I have a TileView in xaml like so:
<Grid x:Name="gScheduler">
                <Grid.RowDefinitions>
                    <RowDefinition x:Name="rdScheduler" Height="*"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition x:Name="rdDetails" Height="auto"/>
                </Grid.RowDefinitions>
                <telerik:RadTileView x:Name="TileView" Grid.Row="0" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
 Background="#00C0C0C0" PreservePositionWhenMaximized="True"
 Margin="5" MinimizedRowHeight="80" MinimizedColumnWidth="300" ColumnsCount="3" RowHeight="480"/>
...

Then I have my TileViewItem like so:
<telerik:RadTileViewItem
    xmlns:schedule="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
x:Class="Rem.Ria.PatientModule.FrontDeskDashboard.ClinicianScheduleTileView"  
    mc:Ignorable="d"
    d:DesignHeight="510" d:DesignWidth="510"  VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" Margin="2" Padding="0" ">
<Grid x:Name="LayoutRoot" Margin="0" >
        <telerik:RadFluidContentControl Margin="0,0,0,0" ContentChangeMode="Automatic" State="Normal" NormalToSmallThreshold="300 200" NormalToLargeThreshold="350 350">
             
            <telerik:RadFluidContentControl.SmallContent>
               ...
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
...
</telerik:RadFluidContentControl.Content>
 
            <telerik:RadFluidContentControl.LargeContent>
...
 </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </Grid>
</telerik:RadTileViewItem>

This would load up just fine and i can maximize an item just fine from normal state, but when i click the maximize on a minimized item it would throw a catastrophic error. 
My fix for this was to set the MinimizedRowHeight to auto and then listen to the TileStateChanged event in the TileViewitem and set the Height of the item to 80 when minimized and set it to double.NaN in when in any other state and I no longer get the exception.

If you need a runnable application to reproduce this i will try and find the time to create this for you, just let me know.

Thanks again for your time. 
0
Zarko
Telerik team
answered on 25 Jan 2012, 05:02 PM
Hi,
Thank you for the feedback! It'll be great if you could send us a project that reproduces the issue because I wasn't able to recreate it. I've attached the project that I used for testing so you could examine it and see what are the differences with yours.
We are looking forward to your replay.

Kind regards,
Zarko
the Telerik team

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

Tags
General Discussions
Asked by
Eric
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Eric
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or