How to add content to a WPF Popup

A Popup control can have only one child. The following code snippet adds a text block to the popup control.  

<Popup Margin="10,10,0,13" Name="Popup1" HorizontalAlignment="Left"

 VerticalAlignment="Top" Width="194" Height="200" IsOpen="True">

       <TextBlock Name="McTextBlock"

             Background="LightBlue" >

        This is popup text

       </TextBlock>

  </Popup>

If you wish to add more contents to the popup control, you may have a stack panel or grid as a child control and place more contents on the panel or grid controls. The following code snippet creates a stack panel and places some contents on it.

<Popup Margin="10,10,0,13" Name="Popup1" HorizontalAlignment="Left"

 VerticalAlignment="Top" Width="194" Height="200" IsOpen="True">

        <StackPanel>

            <TextBlock Name="McTextBlock"

             Background="LightBlue" >

            This is popup text

           </TextBlock>

            <Button Content="This is button on a Pupup" />

        </StackPanel>

  </Popup>