Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamSchedule ActivityPresenter with ContextMenu


I tried to add a ContextMenu with CommandBindings on the ActivityPresenter:

Here a code snippet:

<ControlTemplate x:Key="ActivityTemplate" TargetType="igSchedulePrim:ActivityPresenter">
<StackPanel Margin="-20,0,0,0" Background="White"></StackPanel>
<MenuItem Header="Status Ändern" FontSize="16" Height="40" Command="{Binding DataContext.NextDayCmd, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ig:XamScheduleView}}}" />
<MenuItem Header="Reservierung Löschen" FontSize="16" Height="40"/>




But i get a Binding Error:

Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Infragistics.Controls.Schedules.XamScheduleView', AncestorLevel='1''. BindingExpression:Path=DataContext.NextDayCmd; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'Command' (type 'ICommand')

Hope somebody can help me. 

Best regards