public PackagePreviewPage(DownloadPackagePreviewViewModel viewModel, Action close, SlideDirection entryDirection) { SwappedOut += Dispose; ViewModel = viewModel; _entryDirection = entryDirection; _close = close; InitializeComponent(); this.AnimateInFinished -= OnAnimateInFinished; PreviewCarousel.OnPageIndexChanged += WhenPageIndexChanged; ControllerSupport.SubscribePreviewCustomInputs(SubscribePreviewCustomInputs); // We need to explicitly set focus in case person changes page on controller without // moving the cursor, otherwise ListViewItem under this page might be re-selected, funny issue. this.AnimateInStarted += OnAnimateInStarted; }