Posts

Showing posts with the label SelectionChanged event

UWP: XAML's ListView Control and its SelectionChanged event - Part 2

Image
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 will 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 i...

UWP: XAML's ListView Control and its SelectionChanged event - Part 1

Image
In my previous post you learnt about ListView and ListBox controls used in XAML. In this post you will learn to: Part 1 Progressively build a ListView Control  Place ListViewItems inside a ListView's ItemTemplate You will place three named ListView items Part 2 You will write code to change the properties of items you placed. At first, you launch Visual Studio 2017 Community and create a blank Universal Windows Platform project using C# and provide the name to the project (Project JListView ). JlistView_0.png Here you choose the target and min versions of Windows 10 JlistView_1.png Add a ListView as shown between the 'Grid' as shown using intellisense. JlistView_2.png An empty ListView control is added to the XAML with some default border over the Desktop as shown. JlistView_3.png Now we place an ItemTemplate of the ListView by choosing from a drop-down list. JlistView_4.png Visual Studio is not happy as thi...