I am trying to load a UserControl inside a wpf popup control, From the code below i can see the Popup opening with yellow background but the ContentControl with View is not getting loaded. I am using Caliburn Micro to resolve View and ViewModel. Below is my xaml, The contentcontrol outside the pop works fine, But the same content control inside Popup displays only the yellow background.
<ContentControl x:Name="SearchListViewModel" />
<ToggleButton Name="button1">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<TextBlock Text="Select" />
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup IsOpen="{Binding IsChecked, ElementName=button1}" StaysOpen="False">
<Border>
<StackPanel
Width="500"
Height="500"
Background="Yellow"
Orientation="Vertical">
<ContentControl x:Name="SearchListViewModel" />
</StackPanel>
</Border>
</Popup>
SearchListinstead ofSearchListViewModel. Your view should be calledSearchListView. Caliburn assumes that the view model is called the name + ViewModel on the end. - Jack Hughes