I am looking at the following xaml:
<Grid x:Name="LayoutRoot" Background="White">
<Button Content="Say Hello..." VerticalAlignment="Center"
HorizontalAlignment="Center"
my:ButtonService.Command="{Binding Path=SayHello}"
my:ButtonService.CommandParameter="Bob"/>
</Grid>
I would like to understand how the command gets bound with no code behind. [my:] points to a dll that defines a [ButtonService] static class which in turn defines [CommandProperty] as a DependencyProperty.
I expected this to be part of the code behind while in fact it is in its own class – ButtonService.
Can someone explain to me how (and why) does it work?
The full code is here:
Thank you in advnace.