Can't get action bubbeling to work!

Topics: Actions & Coroutines, Getting Started
Aug 1, 2013 at 5:26 PM
Im using Caliburn.Micro in a WP8 app and i have the following XAML:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
    <ListBox x:Name="Items" HorizontalContentAlignment="Stretch">
                <StackPanel Margin="10" toolkit:TiltEffect.IsTiltEnabled="True">
                    <TextBlock Text="{Binding Name}" />
                            <toolkit:MenuItem Header="Run" cal:Message.Attach="Run($dataContext)" />
                            <toolkit:MenuItem Header="Delete" cal:Message.Attach="Delete($dataContext)" />
And the following .net code
readonly ObservableCollection<TTask> items = new ObservableCollection<TTask>();

public ObservableCollection<TTask> Items
        return items;

public void Run(TTask task)


public void Delete(TTask task)

Why do i get a exception when i select Run or Delete "No target found for method XXXX".
Has a example that is more or less identical..
Aug 1, 2013 at 10:32 PM
Edited Aug 1, 2013 at 10:32 PM
its a problem that is easily over come but is related to nesting and visual tree of wpf/Silverlight. To solve the problem you have to use abit of CM wizardry to overcome the problem:
     <telp:RadContextMenu x:Name="ScheduledFlightMenu"  cm:Action.TargetWithoutContext="{Binding DataContext, ElementName=ScheduledFlights}">
          <telp:RadContextMenuItem Content="edit" cm:Message.Attach="EditFlight($dataContext)" />
          <telp:RadContextMenuItem Content="delete" cm:Message.Attach="DeleteFlight($dataContext)" />
cm:Action.TargetWithoutContext="{Binding DataContext, ElementName=ScheduledFlights}"

Bold part is the key to your nest issues...