AppStore.AppDetailsPage.ShowImages C# (CSharp) Method

ShowImages() private method

Deals with populating images(screenshots) in the App-Details Page.
private ShowImages ( ListViewBase sender, ContainerContentChangingEventArgs args ) : void
sender Windows.UI.Xaml.Controls.ListViewBase Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event.
args ContainerContentChangingEventArgs ContainerContentChangingEventArgs args is a parameter called e that contains the event data, see the ContainerContentChangingEventArgs MSDN page for more information.
return void
        private void ShowImages(ListViewBase sender, ContainerContentChangingEventArgs args)
        {
            if (args.Phase != 1)
            {
                throw new Exception("Not in phase 1.");
            }
            SelectorItem itemContainer = (SelectorItem)args.ItemContainer;
            StackPanel templateRoot = (StackPanel)itemContainer.ContentTemplateRoot;
            Image appImage = (Image)templateRoot.FindName("appScreenshots");
            appImage.Source = new BitmapImage(new Uri(args.Item.ToString()));
            appImage.Opacity = 1;
        }