Suppose there is such a UserControl :
<UserControl> <Button Name="button"></Button> </UserControl> The dependency property is declared in its code-behind :
public partial class Test : UserControl { public LoginButton() { InitializeComponent(); } public ICommand Command { get { return (ICommand)GetValue(CommandProperty); } set { SetValue(CommandProperty, value); } } public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("Command", typeof(ICommand), typeof(Test)); } How to make a binding to the command from UserControl , the binding occurred to the button button ?