protected override Frame OnCreateRootFrame() { _appLoaderService = new AppLoaderService(this); _frame = new Frame(); _frame.Navigated += (s, e) => { var dict = new Dictionary <string, string>(1); dict[MetricaConstants.NAVIGATION_PAGE] = e.SourcePageType.Name; _metricaService?.LogEvent(MetricaConstants.NAVIGATION_EVENT, JsonConvert.SerializeObject(dict)); }; return(_frame); }
public App() { this.InitializeComponent(); this.FrameFactory = () => { _appLoaderService = new AppLoaderService(this); _frame = new WithLoaderFrame(_appLoaderService, this); return(_frame); }; this.UnhandledException += App_UnhandledException; this.Suspending += App_Suspending; this.Resuming += App_Resuming; YandexMetrica.Config.CrashTracking = false; }
private void WithLoaderFrame_Unloaded(object sender, RoutedEventArgs e) { AppLoaderService?.RemoveLoader(this); }
private void WithLoaderFrame_Loaded(object sender, RoutedEventArgs e) { AppLoaderService?.AddLoader(this); }