-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathApp.xaml.cs
51 lines (45 loc) · 1.66 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using Microsoft.ReactNative;
{{^useWinUI3}}
using Windows.ApplicationModel.Activation;
{{/useWinUI3}}
using {{ xamlNamespace }};
using {{ xamlNamespace }}.Controls;
namespace {{ namespace }}
{
sealed partial class App : ReactApplication
{
public App()
{
#if BUNDLE
JavaScriptBundleFile = "index.windows";
InstanceSettings.UseWebDebugger = false;
InstanceSettings.UseFastRefresh = false;
#else
JavaScriptBundleFile = "index";
InstanceSettings.UseWebDebugger = true;
InstanceSettings.UseFastRefresh = true;
#endif
#if DEBUG
InstanceSettings.UseDeveloperSupport = true;
#else
InstanceSettings.UseDeveloperSupport = false;
#endif
Microsoft.ReactNative.Managed.AutolinkedNativeModules.RegisterAutolinkedNativeModulePackages(PackageProviders); // Includes any autolinked modules
PackageProviders.Add(new Microsoft.ReactNative.Managed.ReactPackageProvider());
PackageProviders.Add(new ReactPackageProvider());
InitializeComponent();
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
base.OnLaunched(e);
var frame = Window.Current.Content as Frame;
frame.Navigate(typeof(MainPage));
Window.Current.Activate();
}
}
}