This is a migrated thread and some comments may be shown as answers.
VisibleRangeChangedCommand excution
0 Answers 29 Views
This is a migrated thread and some comments may be shown as answers.
samin
Top achievements
Rank 1
samin asked on 21 May 2012, 12:16 PM
Hi, I think there is a problem in VisibleRangeChange command.
I implemented my project in MVVM but when I trace it during it runs , at first this command executed for twice. loading time takes long time. but in other execution every thing is ok. Is it normal ? or it's a bug?

 
<telerik:RadScheduleView DataContext="{StaticResource CalendarViewerViewModel}" HorizontalAlignment="Left" FontFamily="Tahoma"
                               AppointmentsSource="{Binding Path=Events,Mode=TwoWay}"
                               VisibleRangeChangedCommand="{Binding Path=VisibleRangeChanged}"
                               telerik:StyleManager.Theme="{StaticResource TelerikOfficeBluePersianWrapper}"   VisibleRangeChangedCommandParameter="{Binding Path=VisibleRange, RelativeSource={RelativeSource Self}}"
                               ActiveViewDefinitionIndex="0" Name="radScheduleView1" VerticalAlignment="Top">

private ICommand visibleRangeChanged;
       public ICommand VisibleRangeChanged
       {
           get
           {
               return this.visibleRangeChanged;
           }
           set
           {
               this.visibleRangeChanged = value;
           }
       }
 
       private void VisibleRangeExecuted(object param)
       {
           IDateSpan dateSpan = param as IDateSpan;
           _dataProvider.LoadTimeSlicesAsync(new DateTimeRange(dateSpan.Start, dateSpan.End));
       }
       private bool CanVisibleRangeCanExecuted(object param)
       {
           return param != null;
       }

No answers yet. Maybe you can help?

Asked by
samin
Top achievements
Rank 1
Share this question
or