You can use a VisualBrush for that purpose.
You can add a Rectangle
(instead of your Image
):
<Rectangle Name="myRect" Stroke="Black" StrokeThickness="2" Margin="5" />
and, set its Fill
with a VisualBrush
that contains your control:
MyUserControl control = new MyUserControl();
VisualBrush vb = new VisualBrush
{
Visual = control,
Stretch = System.Windows.Media.Stretch.Uniform
};
myRect.Fill = vb;