Custom ContentControl does not bind

Feb 22, 2012 at 5:13 AM

Hi Caliburn,
I created a custom content control I tried to bind to a ViewModel property with no luck. When I exchange the
CustomContentControl with a normal ContentControl all works like expected. My OverlayContentControl Control inherites from  
ContentControl and uses (probably not needed) [ContentProperty("Content")]

Does not work:

<cc:OverlayContentControl cal:View.Model="{Binding ActiveViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

public IScreen ActiveViewModel
{
get { return m_ActiveViewModel; }
set { m_ActiveViewModel = value; NotifyOfPropertyChange(() => ActiveViewModel);}
}
private IScreen m_ActiveViewModel;

WORKS:

 <ContentControl cal:View.Model="{Binding ActiveViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

Any help would be appreciated.

Joe