public ImageViewer() { InitializeComponent(); this.Dock = DockStyle.Fill; currentIVData = new ImageViewerData(); ImageToBeSaved = new HImage(); }
private async void MessageControl_OnImageMessageClick(WtMessage.Message message) { var data = new ImageViewerData { SelectedItem = UtilityTool.GetS3FileUrl(message.Body.Attachment.Id), ItemSource = ViewModel.Messages .Where(m => m.Type == WtMessage.MessageType.Image) .Select(m => UtilityTool.GetS3FileUrl(m.Body.Attachment.Id)) .ToList() }; CoreApplicationView newView = CoreApplication.CreateNewView(); int newViewId = 0; await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Frame frame = new Frame(); frame.Navigate(typeof(ImageViewerPage), data); Window.Current.Content = frame; Window.Current.Activate(); newViewId = ApplicationView.GetForCurrentView().Id; }); await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId); }
protected override void OnNavigatedTo(NavigationEventArgs e) { Data = e.Parameter as ImageViewerData; }