protected override void OnNavigatedFrom(NavigationEventArgs e) { if (contentSetterTask != null) { contentSetterTask.Cancel(); } }
public void Dispose() { pollingTask.Cancel(); longList.ItemRealized -= LLS_ItemRealized; longList.ItemUnrealized -= LLS_ItemUnrealized; items.Clear(); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { if (locationMarkingTask != null) { locationMarkingTask.Cancel(); } foreach (var task in Tasks) { task.Cancel(); } }
public override void Dispose() { base.Dispose(); if (locationUpdaterTask != null) { locationUpdaterTask.Cancel(); } if (timeUpdaterTask != null) { timeUpdaterTask.Cancel(); } }
protected override void OnNavigatedFrom(NavigationEventArgs e) { if (contentSetterTask != null) { contentSetterTask.Cancel(); } if (flashTask != null) { flashTask.Cancel(); } if (llObserver != null) { llObserver.Dispose(); llObserver = null; } }
private void addScrollingHandlers() { RootFrame.PointerPressed += ContentPanel_PointerPressed; speedMonitorTask = new PeriodicTask(50, monitorSpeed); speedMonitorTask.Run(); var page = ContentPanel.FirstVisualParent <Page>(); page.PointerMoved += Page_PointerMoved; page.PointerReleased += Page_PointerReleased; this.Unloaded += (sender, args) => { page.PointerMoved -= Page_PointerMoved; page.PointerReleased -= Page_PointerReleased; speedMonitorTask.Cancel(); }; }