Hello,
Welcome to Microsoft Q&A!
Is it possible to access items in Page 1 from Page 2?
If you want to access controls from other pages, you could try to set the x:FieldModifier of the control as public. In this case, it will be public and you can access the control by its x:name from other pages. For example:
Page1.xaml:
<controls:TabView x:FieldModifier="public" Grid.Row="1" x:Name="MyTabs">
</controls:TabView>
Page1.xaml.cs:
You need to define a public static Page1 instance to let other pages access your control through this instance.
public Page1()
{
this.InitializeComponent();
Current = this;
}
public static Page1 Current;
Page2.xaml.cs:
TabView tabview = Page1.Current.MyTabs;
Is it safe to delete the Page 2 XAML file?
A .xaml file has a .xaml.cs code-behind file which contains the logic. Together, the XAML and code-behind make a complete class. The .xaml.cs associates itself with the corresponding XAML by calling the generated InitializeComponent method in its constructor. If you delete the XAML file, it can't find the XAML and will throw exceptions.