I'm trying to control the state of child UserControls from my main UserControl. I was thinking of achieving that by creating a DependencyProperty object in Parent UC and referencing it in XAML when creating Children UCs. 

The problem is, I get NullReferenceException in Step.xaml.cs (Child code behind) with everything referencing Controller property, first being StepEnabled property. When I leave out the XAML binding and let it instantiate in constructor, it's ok, though I can't of course control anything, but the way it is Controller property always goes null... Code follows:

ParentViewModel:

```
public class ParentVM : NotifyPropChanged
{
    ...

    public StepController Step1 = new StepController();
    public StepController Step2 = new StepController();
    public StepController Step3 = new StepController();

    public ParentVM()
    {
        ...

        GetReady();
    }

    public void GetReady()
    {
        Step1.Clear();
        Step2.Clear();
        Step3.Clear();

    }

```

StepController:

```
public class StepController
{
    public bool StepEnabled;
    public bool? WasSuccessful;

    public StepController()
    {
        Clear();
    }
    public void Clear()
    {
        StepEnabled = false;
        WasSuccessful = null;
    }
}

```

Child (code behind):

```
public partial class Step : UserControl
{
    public static DependencyProperty ControllerProperty =
    DependencyProperty.Register("Controller", typeof(StepController), typeof(Step), new UIPropertyMetadata(null));

    public StepController Controller
    {
        get { return (StepController)GetValue(ControllerProperty); }
        set { SetValue(ControllerProperty, value); }
    }

    ...

    public bool StepEnabled
    {
        get { return (bool)Controller.StepEnabled; }
        set { Controller.StepEnabled = value; }
    }
    public bool IsDone
    {
        get
        {
            return (Controller.WasSuccessful != null);
        }
    }
    public bool? WasSuccessful
    {
        get { return Controller.WasSuccessful; }
        set { Controller.WasSuccessful = value; }
    }

    public Step()
    {
        InitializeComponent();
        this.DataContext = this;

        ...

        Controller = new StepController();

    }

}

```

ParentUC:

```
...
<local:Step Controller="{Binding Path=Step1, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
...

```

ChildUC:

```
e.g.:
<TextBlock IsEnabled="{Binding StepEnabled, UpdateSourceTrigger=PropertyChanged}" />

```

I'm pretty new to WPF and am still unsure about whole lot of things like DataContext and such, so I guess I'm missing something obvious... Thanks for the help in advance!