I have an implementation class of ICommand as follow:

namespace WpfApplication1
{
public class commandBtn
{
private void DoSomething()
{

}
private ICommand _cmd;

public ICommand Cmd
{
get{
_cmd = new GenericCommand(DoSomething);
return _cmd;
}
}
}
}


and my window class as follow:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Button Name="test" Content="click" />
</Grid>
</Window>

public Window1()
{
InitializeComponent();

commandBtn ctx = new commandBtn();
this.DataContext = ctx;

}

How come the "Cmd" ICommand is still executed while there is no control that binds to it?