Example #1
0
        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);
        }
Example #2
0
        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;
        }
Example #3
0
 private void WithLoaderFrame_Unloaded(object sender, RoutedEventArgs e)
 {
     AppLoaderService?.RemoveLoader(this);
 }
Example #4
0
 private void WithLoaderFrame_Loaded(object sender, RoutedEventArgs e)
 {
     AppLoaderService?.AddLoader(this);
 }