Posts

Showing posts with the label ListView

UWP: Placing a ScrollViewer within a ScrollViewer

Image
A ScrollViewer enables content to be displayed in a smaller area than its actual size. When the content of the ScrollViewer is not entirely visible, the ScrollViewer displays scrollbars that the user can use to move the content areas that is visible. The area that includes all of the content of the ScrollViewer is the extent. The visible area of the content is the viewport. The following contain a ScrollViewer in their templates: ListView GridView TextBox RichEditBox In this post you will see a ScrollViewer inside a GridView . The ScrollViewer has two contents, an Image and a TextBox . The TextBox has its own ScrollViewer with only horizontal scrolling. The default text which is 'Rose' changes to a longer sentence (Event: ViewChanged="SV_ViewChanged") which can be scrolled using your finger or, with the left/right arrow keys when the cursor is anchored in the text box. The image and the text as a whole can be scrolled both vertically and horizontally. ...

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...

XAML ListView Control for Universal Windows Apps

Image
I have posted a number of articles related to ListBlock , ListView etc that you can use in HTML 5, web applications using Intel's XDK. Intel XDK's development platform for several frameworks were discontinued and Intel's effort is in the realm of Internet of Things devices and related applications. Microsoft's Universal Windows Framework apps are well supported by Microsoft and you could use it for not only Windows but for other devices as well. In the Universal Windows Platform (UWP) projects there is an advantage of one code that works on different device families (phone, tablet, desktop etc.). However, the UWP projects depend on using XAML. For example the 'List' related controls in UWP are as shown here: In this post, I will show you how you may work with this controls for a UWP project. Getting the ListView Control Placing ListView on the Design area Adding Textbox Controls to ListView Making changes to XAML Code We start with a W...

New version of JavaScript library WinJS is now in preview

WinJS is a cross-platform JavaScript library for building HTMl5/CSS/JavaScript applications across devices. When it was announced first in 2014 it was Open Sourced. The version in preview is 4.0 . The feature set got beefed up with the following: ( http://visualstudiomagazine.com/articles/2015/04/01/winjs-4-preview.aspx ): Universal experiences: UI controls will scale or translate among various devices without having to go through significant rewrites. Addition of controls: ContentDialog, SplitView, AutoSuggestBox and ToolBar controls are now available; Hub and Pivot controls and other controls are updated. AngularJS Support: An AngularJS-WinJS wrapper allows WinJS-originated code to be used in AngularJS projects. ListView Improvements: "ListView is a signature control for WinJS," according to the Windows blog. As such, its capabilities have been streamlined to work almost identically from mouse- to touch-enable device: multi-selection, lists in alternating stripes, p...