In addition to the 2 errors in the image attached I think that there is this error too: you are trying to open a website with a Frame, I think you need a WebView.
Moreover I think that you are using Microsoft.Toolkit.Uwp.UI.Controls.TabView but you are looking sample code for Microsoft.UI.Xaml.Controls.TabView
- Microsoft.Toolkit.Uwp.UI.Controls.TabView comes with Microsoft.Toolkit.Uwp.UI.Controls NuGet package
- Microsoft.UI.Xaml.Controls.TabView comes with Microsoft.UI.Xaml NuGet package
Try to change your method in this way:
private void AddTab_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
var newTab = new TabViewItem {Icon = new SymbolIcon {Symbol = Symbol.Document}, Header = "New Tab"};
WebView frame = new WebView();
newTab.Content = frame;
frame.Navigate(new Uri("http://www.msn.com"));
Tabs.Items.Add(newTab);
Tabs.SelectedItem = newTab;
}