Showing posts with label Universal Windows Platform. Show all posts
Showing posts with label Universal Windows Platform. Show all posts

Saturday, March 24, 2018

UWP: SplitView XAML Control

SplitView Class in XAML provides us with two views, one for Main content and the other, a Pane that can be used for navigation.

This is the inheritance chain:

DependencyObject 
|  UIElement | Framework Element | Control |SplitView




An Example using Visual Studio Community 2017

You can get a basic start with the SplitView Control here.

You could replace the default 'grid' in a Blank UWP project shown here:

DefaultBlank.png

Use the following in its place:


SplitView sample.png

This is ready for build. Build and run the app in the Local Computer.
This is what you see when the app is run.


There is a Pane (the SplitView. Pane and there is a TextBlock named 'Content' in the Grid.

Now I change the OpenPanelLenth (presently 296) to, say 150 and build and run the app. What do I see?


SplitView 2

Basically you can now see more content.

In the 'Pane' you can place controls and hook up events to them to display related 'Content' in the Content (i.e., inside the 'grid' control) on the right.

Friday, March 02, 2018

Pivot control to navigate pages in a Universal Windows Platform app

Pivot control with its tabs helps you in navigating between items which can be content panes. Each item has a header to provide the text for the tab. The Pivot has a title and is the container of PivotItems.

The following 3 images show the navigation between three items.

In this app, the Pivot title is: Navigating with Pivot. The first PivotItem header is 'Home', the second PivotItem's header reads 'English' and the third PivotItem's header is 'Spanish'.

I have some text in English in the PivotItem with header 'English' and similarly a translation of the English text to Spanish in the PivotItem for Spanish. You can go from one page to the other easily. The images are from a deployment to a Lumia 950 phone.

Home is the first PivotItem in the app:

 Now navigated to English

Now navigated to the 'Spanish'


Now the code is very simple and uses only XAML statements

Here is the MainPage.xaml:

Note: Although this page does not throw an error. It builds, deploys and runs without an error but the Hyperlink in the first PivotItem is not active, although showing up as a hyperlink (underline and all!).
I am checking on this one. It is interesting to note that Hyperlink is not a control in the XAML tool set.

Wednesday, February 07, 2018

Universal Windows Platform: ListView and SelectionChanged event - Part1

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 this template cannot be empty. We will add a DataTemplate inside the ItemTemplate, again using intellisense.

JlistView_5.png

Choose to place a DataTemplate.


JlistView_6.png

DataTemplate is placed and there is no red wiggly line for ItemTemplate like before. 


JlistView_7.png


Now we place a Grid, layout element, again using intellisense.



JlistView_8.png


Wednesday, January 17, 2018

Regarding UWP Support for .NET Standard 2.0


Mostly I am looking at what I have to verify that they are enough for developing latest UWP Projects. The main feature that .NET 2.0 Standard brings about is the access for about 20000 APIs.

So what are the requirements?

You need to have Visual Studio 2017 v15.4. According to my previous post this was installed sometime ago (1, 2).


VS2017Comm_About

The other requirement is that you should be running and targeting correct version of  Windows 10 Fall Creators Update.

These requirements are the baseline for UWP tools.

I am using the free Visual Studio 2017 Version and in my project properties I find that I can choose couple of options for the Min version for Windows 10 Fall creators Update as shown.



VS2017Comm_MinTarget 

Note however, that when you try to change the Min target version you will need to heed to the following message:


VS2017Comm_MinTargetx2

When I changed the Min version to one suggested, the Microsoft.Net.Native.Complier 2.0 was installed after which the Hello World Project was restored.


VS2017Comm_MinTarget 3

UWP Reference properties after the change are as shown:


VS2017Comm_MinTarget 4

Looks like I am well set.




Monday, August 31, 2015

One Store, One Codebase with Universal Windows Platform

 Windows Bridges are coming to span all devices!

A single app platform to cover the whole Windows device family that includes PCs, Tablets, Phones, Surface Hub and to include in the future Xbox, Hololens and Raspberry PI.

On the heels of Windows 10, Microsoft is releasing four Windows Bridge toolkits that will bring over your existing code to Universal Windows Platform and add interesting capabilities such as,
  • Live tiles
  • Active Notifications
  • Windows Store in-app purchase

Each toolkit provides tailored tools and run-time technologies for a chosen codebase as shown here. A separate toolkit for the codebases shown here:
  • iOS apps Public developer preview available
DMCA.com Protection Status