I have a usercontrol that exposes a few dependency properties. If I was to use this user control directly I'd just set a binding directly in the view for the property, ex:
<uc:MyControl MyCustomProperty="{Binding SomeOtherProperty}" />
Since I'm using Caliburn Micro and MVVM, it seems the preferred way is to create a property on the "parent" viewmodel of type MyControlViewModel then place a ContentControl in the view. That is supposed to create the ViewModel associated with the user control "MyControl" (instead of sticking all the code in the "codebehind" of my user control), then set the datacontext so it's bound together.
So the ViewModel of the "parent" screen would look like this:
public MyControlViewModel MyControl { get; set; }
// MyControlViewModel gets either passed in via contructor or instanciated in the contructor
And the view of the parent screen would have this:
<ContentControl x:Name="MyControl" />
That works great. Caliburn renders the control into the ContentControl and it's bound to the MyControlViewModel as expected.
My question is - how do I bind MyCustomProperty at this point? ContentControl doesn't expose MyCustomProperty. Is there some syntax that I can use here where I can set this binding up?