Cannot bind to the command with RelativeSource

Apr 15, 2011 at 8:10 AM

Hi,

Using  the DockableContent  and MVVM, I can't bind the command.

xmal code:

<Button Name="navButton" Content="fafa"    

        Command="{Binding Path=NavItemDoubleClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=ad:DockableContent}}"          

        CommandParameter="{Binding}"  >      

 </Button>

Is there any wrong?