I have a mainform which has a tabControl. I am attempting to create a userControl that can be added to a tabItem.
I aim to add a tabControl to the userControl however I get this error:
'[Unknown]' property does not point to a DependencyObject in path '(0).(1)[1].(2)'.
The code is very simple within the userControl
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TabControl>
<TabItem>
</TabItem>
</TabControl>
</Grid>
How do I create the userControl so that it can contain a tabControl and then be added to the mainForm within a tabItem?
UserControl1.xmal
UserControl.cs
MainWindow.xaml
In this case, the TextBox cannot be accessed through the x:Name="",
Because TextBox is a child of UserControl, not a child of MainWindow.