AppStore.Templates.InfoPage.InfoList_ContainerContentChanging C# (CSharp) Method

InfoList_ContainerContentChanging() private method

It populates the list of the words in the view.
private InfoList_ContainerContentChanging ( 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 InfoList_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
        {
            args.Handled = true;
            if (args.Phase != 0)
            {
                throw new Exception("Not in phase 0.");
            }
            string word = args.Item.ToString();
            StackPanel templateRoot = (StackPanel)args.ItemContainer.ContentTemplateRoot;
            TextBlock wordTitle = (TextBlock)templateRoot.FindName("InfoTitle");
            wordTitle.Text = word;
        }