Hi,
I have a problem since I upgrated from version 2010.3.1314.35 to 2011.2.712.40.
In my scenario I have a "special" TimeRulerItemTemplateSelector which displays a progressbar (status for each day).
With version 2010.3.1314.35 the value-binding (Value="{Binding DateTime, Converter={StaticResource GetDateValue}}") works fine, version 2011.2.712.40 fired the following error:
TwoWay- oder OneWayToSource-Bindungen funktionieren nicht mit der schreibgeschützten Eigenschaft "DateTime" vom Typ "Telerik.Windows.Controls.ScheduleView.TimerRulerItemProxy".
my sources:
<telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
<DataTemplate>
<Grid Height="60">
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="20"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{Binding DateTime, Converter={StaticResource GetWeekDay}}"/>
<TextBlock Grid.Row="1" Text="{Binding DateTime, Converter={StaticResource GetDateShort}}"/>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="2,0,0,0">
<ProgressBar Width="40" Minimum="0" Maximum="100" Value="{Binding DateTime, Converter={StaticResource GetDateValue}}"/>
<TextBlock Text="{Binding DateTime, Converter={StaticResource GetDateValue}}"/>
<TextBlock Text="%"/>
</StackPanel>
</Grid>
</DataTemplate>
</telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
and the GetDateValue Function:
Public Class GetDateValue
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
If TypeOf value Is DateTime Then
Dim dt As DateTime = DirectCast(value, DateTime)
value = 50 'only for demo...
End If
Return value
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
with best regards,
Stefan
I have a problem since I upgrated from version 2010.3.1314.35 to 2011.2.712.40.
In my scenario I have a "special" TimeRulerItemTemplateSelector which displays a progressbar (status for each day).
With version 2010.3.1314.35 the value-binding (Value="{Binding DateTime, Converter={StaticResource GetDateValue}}") works fine, version 2011.2.712.40 fired the following error:
TwoWay- oder OneWayToSource-Bindungen funktionieren nicht mit der schreibgeschützten Eigenschaft "DateTime" vom Typ "Telerik.Windows.Controls.ScheduleView.TimerRulerItemProxy".
my sources:
<telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
<DataTemplate>
<Grid Height="60">
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="20"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{Binding DateTime, Converter={StaticResource GetWeekDay}}"/>
<TextBlock Grid.Row="1" Text="{Binding DateTime, Converter={StaticResource GetDateShort}}"/>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="2,0,0,0">
<ProgressBar Width="40" Minimum="0" Maximum="100" Value="{Binding DateTime, Converter={StaticResource GetDateValue}}"/>
<TextBlock Text="{Binding DateTime, Converter={StaticResource GetDateValue}}"/>
<TextBlock Text="%"/>
</StackPanel>
</Grid>
</DataTemplate>
</telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
and the GetDateValue Function:
Public Class GetDateValue
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
If TypeOf value Is DateTime Then
Dim dt As DateTime = DirectCast(value, DateTime)
value = 50 'only for demo...
End If
Return value
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
with best regards,
Stefan