If you want to do it in MVVM way, then you need first to create a View(in example it is window with control, and you need to create userControl with an element that you need(TextOnAPath)from example) After that, you create a window with control container and set it to binding. After that you will be able to create it when you need. Now a little example that it will be more clear to you.
Your View:
<usercontrol x:class="TextOnAPathTestApp.UserControl1" xmlns:x="#unknown">
xmlns=http:
xmlns:x=http:
xmlns:TextOnAPath="clr-namespace:TextOnAPath;assembly=TextOnAPath"
Title="Test App" Height="500" Width="500">
<grid>
<textonapath:textonapath fontsize="30" drawpath="True" xmlns:textonapath="#unknown">
Text="The quick brown fox jumped over the lazy hen.">
<textonapath:textonapath.textpath>
<pathgeometry figures="M0,0 C120,361 230.5,276.5 230.5,276.5 <br mode=" hold=" /> L308.5,237.50001 C308.5,237.50001 419.5,179.5002 367.5,265.49993 <br mode=" />
</textonapath:textonapath.textpath>
</textonapath:textonapath>
</grid>
</usercontrol>
Now let's create a window, where this view can be loaded. Don't forget to enter namespaces with your viewModel
<window x:class="TextOnAPathTestApp.Window1" xmlns:x="#unknown">
xmlns=http:
xmlns:x=http:
xmlns:TextOnAPath="clr-namespace:TextOnAPath;assembly=TextOnAPath"
Title="Test App" Height="500" Width="500">
<window.resources>
<datatemplate datatype="{x:Type YourViewModel}">
<yourusercontrolview />
</datatemplate>
</window.resources>
<grid>
<contentcontrol content="{Binding}" />
</grid>
</window>
Now to load (TextOnPath) in runtime your window with userControl you need following in some click event:
var window = new WindowThatYouCreated(){DataContext = new YourViewModel() };
window.ShowDialog();
Hope this helped you. If you have questions, feel free to ask.