Sharing structured data

XML Magazine

Subscribe to XML Magazine: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get XML Magazine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


XML Authors: Jnan Dash, Jayaram Krishnaswamy, Jason Bloomberg, Chris Pollach, Peter Silva

Related Topics: XML Magazine

Blog Feed Post

Universal Windows Platform: ListView and SelectionChanged event - Part 2

In my previous post (UWP: XAML's ListView Control and its SelectionChanged event - Part 1) you learnt the following:

Part 1
  • Progressively build a ListView Control 
  • Place ListViewItems inside a ListView's ItemTemplate
  • You will place three named ListView items
In this part you wil learn how to write code to change the properties you set for the ListViewItems by the SelectionChanged event.

The following image shows the app after a successful run. This displays how the app is displayed at this stage:

              
JListView_23

This next image shows the effect of the SelectionChanged event.


JListView_28

You could set the FontSize properties in design as shown.To start with all the ListViewItem's FontSize was 15px and FontFamily Segoe UI (defaults). Clicking the ListViewItem for 'Dog', you can change its size in the property box (now focus is on 'bird').


JListView_15

As shown in the next image, you insert 'SelectionChanged' inside the ListView. If you just type the letter S, you should get a selection list in which you will find 'SelectionChanged'.


JListView_17

Place the "=" sign after it and you should get the "New Event Handler" and when you click this you will create the ListView_SelectionChaged event.


JlistView_18

In the code behind (MainPage.xaml.cs), the new event is displayed as shown


JlistView_19

Part 2 is continued here.

Read the original blog entry...

More Stories By Jayaram Krishnaswamy

Jayaram Krishnaswamy is a technical writer, mostly writing articles that are related to the web and databases. He is the author of SQL Server Integration Services published by Packt Publishers in the UK. His book, 'Learn SQL Server Reporting Services 2008' was also published by Packt Publishers Inc, Birmingham. 3. "Microsoft SQL Azure Enterprise Application Development" (Dec 2010) was published by Packt Publishing Inc. 4. "Microsoft Visual Studio LightSwitch Business Application Development [Paperback] "(2011) was published by Packt Publishing Inc. 5. "Learning SQL Server Reporting Services 2012 [Paperback]" (June 2013) was Published by Packt Publishing Inc. Visit his blogs at: http://hodentek.blogspot.com http://hodentekHelp.blogspot.com http://hodnetekMSSS.blogspot.com http://hodnetekMobile.blogspot.com He writes articles on several topics to many sites.