/// <summary> /// Handles the Unloaded event of the HubTileX control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void HubTileX_Unloaded(object sender, RoutedEventArgs e) { HubTileXService.UnRegisterHubTile(this); if (flipTimer != null) { if (flipTimer.IsEnabled) { flipTimer.Stop(); } } }
/// <summary> /// Handles the Loaded event of the HubTileX control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void HubTileX_Loaded(object sender, RoutedEventArgs e) { HubTileXService.RegisterHubTile(this); if (this.RearContent != null && this.ShouldFlip) { flipTimer = new DispatcherTimer(); flipTimer.Interval = TimeSpan.FromSeconds(this.flipDuration); flipTimer.Tick += flipTimer_Tick; flipTimer.Start(); } }