I am trying to create a simple dependency property proxy. I made a custom control, it's a file picker, which is made off a textbox (name: `"TextBox_FilePath"`) and a button showing the open file dialog.

As I am making a reusable control I'd like it to have a `"SelectedFilePath"` property. As the `Text` property seems to be perfect for my control to be the `"SelectedFilePath"` property, I'd just like to proxy these dependency property.

The first approach I made was:

```
public static readonly DependencyProperty SelectedFilePathProperty = TextBox.TextProperty;

public string SelectedFilePath
{
    get { return (string) this.TextBox_FilePath.GetValue(SelectedFilePathProperty); }
    set { this.TextBox_FilePath.SetValue(SelectedFilePathProperty, value); }
}

```

which worked, but throwed an exception when trying to bind to that property. Then I came off with:

```
public static readonly DependencyProperty SelectedFilePathProperty =
    DependencyProperty.Register("SelectedFilePath", typeof (string), typeof (FilePicker), new PropertyMetadata(default(string)));

public string SelectedFilePath
{
    get { return (string) this.TextBox_FilePath.GetValue(SelectedFilePathProperty); }
    set { this.TextBox_FilePath.SetValue(SelectedFilePathProperty, value); }
}

```

which does work, but I've got no idea why?! Where did I specify I wanted the `text` property of the textbox?

**What am I missing to simply proxy out that dependency property?**

**EDIT:**
The solution with `AddOwner` doesn't work too, it throws an Excetion saying "binding can only be applied on a dependency property". Code:

```
public static readonly DependencyProperty SelectedFilePathProperty =
    TextBox.TextProperty.AddOwner(typeof(FilePicker));

public string SelectedFilePath
{
    get { return (string)this.TextBox_FilePath.GetValue(SelectedFilePathProperty); }
    set { this.TextBox_FilePath.SetValue(SelectedFilePathProperty, value); }
}

```

What don't I understand?

**EDIT2:**
For everybody else having issues understanding the answer, I've made [a little graphic](https://stackoverflow.com/a/10997648/808723)