This question is locked. New answers and comments are not allowed.
Hello,
I'm handling the visiblerangechanged event via commanding as follows in my xaml:
<i:Interaction.Triggers>
<i:EventTrigger EventName="VisibleRangeChanged" >
<i:InvokeCommandAction Command="{Binding ViewDefinitionChangedCommand}" CommandParameter="{Binding ElementName=scheduleView, Path=ActiveViewDefinition}" />
</i:EventTrigger>
</i:Interaction.Triggers>
In the VM, the ICommand is setup as follows:
ViewDefinitionChangedCommand = new DelegateCommand<ViewDefinitionBase>(OnViewDefinitionChanged);
The "OnViewDefinitionChanged" is getting executed when I change view, but when I change from say the Day view to the Week view the ViewDefinitionBase object getting passed to the execute method is the ViewDefinitionBase I am changing from, not the ViewDefinitionBase I am changing TO.
I also tried binding the ActiveViewDefinition to a VM property and handling the OnPropertyChanged event, but this doesnt seem to get fired (e.g. ActiveViewDefinition="{Binding Adf, Mode=TwoWay}" )
How do I handle the changing of the view definition such that I have access to the view being navigated to ?
Kind regards,
I'm handling the visiblerangechanged event via commanding as follows in my xaml:
<i:Interaction.Triggers>
<i:EventTrigger EventName="VisibleRangeChanged" >
<i:InvokeCommandAction Command="{Binding ViewDefinitionChangedCommand}" CommandParameter="{Binding ElementName=scheduleView, Path=ActiveViewDefinition}" />
</i:EventTrigger>
</i:Interaction.Triggers>
In the VM, the ICommand is setup as follows:
ViewDefinitionChangedCommand = new DelegateCommand<ViewDefinitionBase>(OnViewDefinitionChanged);
The "OnViewDefinitionChanged" is getting executed when I change view, but when I change from say the Day view to the Week view the ViewDefinitionBase object getting passed to the execute method is the ViewDefinitionBase I am changing from, not the ViewDefinitionBase I am changing TO.
I also tried binding the ActiveViewDefinition to a VM property and handling the OnPropertyChanged event, but this doesnt seem to get fired (e.g. ActiveViewDefinition="{Binding Adf, Mode=TwoWay}" )
How do I handle the changing of the view definition such that I have access to the view being navigated to ?
Kind regards,