Why is the AppointmentCreated fired when the view definition changes?

1 posts, 0 answers
  1. Myles
    Myles avatar
    18 posts
    Member since:
    Mar 2012

    Posted 23 Apr 2012 Link to this post

    I have a RadScheduleView that uses the command pattern e.g.

     

            <telerik:RadScheduleView
                HorizontalAlignment="Stretch"
                Name="radScheduleMovements"
                VerticalAlignment="Stretch"
                VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
       VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"           
                AppointmentsSource="{Binding Movements}"
                EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}">
                <telerik:RadScheduleView.ViewDefinitions>
                    <telerik:DayViewDefinition />
                    <telerik:WeekViewDefinition />
                    <telerik:MonthViewDefinition />
                    <telerik:TimelineViewDefinition />
                </telerik:RadScheduleView.ViewDefinitions>

                <i:Interaction.Triggers>

                    <i:EventTrigger EventName="AppointmentCreated">
                        <Command:EventToCommand Command="{Binding AppointmentCreatedCommand}" PassEventArgsToCommand="True" />
                    </i:EventTrigger>

                    <i:EventTrigger EventName="AppointmentEdited">
                        <Command:EventToCommand Command="{Binding AppointmentEditedCommand}" PassEventArgsToCommand="True" />
                    </i:EventTrigger>

                </i:Interaction.Triggers>
            </telerik:RadScheduleView>


    My problem is this.  When in the month view the AppointmentCreated event is getting fired when you double click on a day slot header.  The view definition correctly changes to the day view but not without first firing the AppointmentCreated event.  How can I prevent this?

     

Back to Top