Is another test.xaml in the same solution as mainwindow.xaml? Also, is test.xaml a user control? If yes, then at the top declare: xmlns:view="clr-namespace:(project your test.xaml is in);assembly=(project your test.xaml is in) then inside your mainwindow.xaml in the tab control or grid simply do <Grid> <view:test/> </Grid> If you can give me a little more to go on I feel sure I can point you in the right direction.
This is an example of what it should look like for referencing a user control in your main window:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:view="clr-namespace:MyTestProject;assembly=MyTestProject"
Title="MainWindow" Height="350" Width="525">
<Grid>
<view:Test />
</Grid>
</Window>