The best shot at an MCVE in this thread is, with VS2017 15.5.2, load up the XAML of LabelControlAdvancedSample, the last example in this tutorial page.
<Window x:Class="WpfTutorialSamples.Basic_controls.LabelControlAdvancedSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="LabelControlAdvancedSample" Height="180" Width="250">
<StackPanel Margin="10">
<Label Target="{Binding ElementName=txtName}">
<StackPanel Orientation="Horizontal">
<Image Source="http://cdn1.iconfinder.com/data/icons/fatcow/16/bullet_green.png" />
<AccessText Text="_Name:" />
</StackPanel>
</Label>
<TextBox Name="txtName" />
<Label Target="{Binding ElementName=txtMail}">
<StackPanel Orientation="Horizontal">
<Image Source="http://cdn1.iconfinder.com/data/icons/fatcow/16/bullet_blue.png" />
<AccessText Text="_Mail:" />
</StackPanel>
</Label>
<TextBox Name="txtMail" />
</StackPanel>
Having left the App.xaml & App.xaml.cs at default, attempting to compile the above produces the linker error.
Fortunately, when hovering over the InitializeComponent() statement in LabelControlAdvancedSample.xaml.cs there is a linked text hint:
Show potential fixes.
Clicking it invokes another linked text:
Generate method MainWindow.InitializeComponent.
Doing this produces the following "do nothing" method:
private void InitializeComponent()
{
throw new NotImplementedException();
}
The function must be defined for the project to build. Looks like something differs in the implementation of InitializeComponent in WPF to VB.Net.
Edit: The namespace.class in the first line of the xaml is not correct.
According to MSDN and @Sean B's answer, it should be
<Window x:Class="LabelControlAdvancedSample.MainWindow"
Thus the project compiles without error and the dummy InitializeComponent method is not required, in fact it generates more errors. Goes to show VS can be helpful, even in the extremely rare case of user error. :P