Error when closing tab item

Topics: Actions & Coroutines
Oct 12, 2011 at 9:00 PM


I'm stepping through the SimpleMDI sample in the documentation, and am trying to recreate the sample using Silverlight instead of WPF.

I'm able to create multiple items in a Listbox (instead of a TabControl).  So, that part is working fine.  However, when I click the 'x' to close a tab item, I get an unhandled exception  with the error 'No target found for method CloseItem()'

Any ideas how to troubleshoot this?




Oct 12, 2011 at 9:17 PM
Edited Oct 12, 2011 at 9:24 PM

Part of the problem is that I wasn't sure how to create a 'horizontal listbox'.  Here is the ShellView I'm using:

<UserControl x:Class="CaliburnTest.ShellView"
        <Button x:Name="OpenTab"
                Content="Open Tab" 
                tc:DockPanel.Dock="Top" />
        <ListBox x:Name="Items">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayName}" />
                        <Button Content="X"
                                cal:Message.Attach="CloseItem($dataContext)" />
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Top"/>

Jan 19, 2012 at 10:20 PM

I also have the same problem, Is there a solution to this?

Jan 20, 2012 at 3:11 AM

Please create a ticket and attach your sample with instructions to reproduce ASAP. I'm doing a release tomorrow (Friday). So, if there is a bug, I'd like to try to fix it if I can.

Jan 20, 2012 at 9:22 PM

Just re-got the v1.2 RTW release and the SimpleMDI project is working correctly,