Posts

Showing posts from February, 2018

Pivot Control in a Universal Windows Project

Image
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 th

Examples of types of content for controls in UWP

Image
Content of Controls follow this inheritance order: DependencyObject      --->UIElement        --->FrameworkElement          --->Control           ---->ContentControl Content property of a ContentControl can any of: string UIElement DateTime Controls such as BUTTON, CHECKBOX and SCROLLVIEWER inherits directly or indirectly from the CotentControl Class When UIElement is set as Content property then the UI is displayed in the ContentControl. When Content property is string or DateTime, a string representation of the object is displayed in the Control. Here is a object whose Content is a string. The BUTTON's content is a string. ContentString.png Here are UIElements that are the Content of a Control  A Rectangle object is the content of a Button. ContentUI_0 A TEXTBOX is the content of this BUTTON ContentUI_1 A BUTTON can also be the content of a BUTTON. ContentUI_2 The content of this CHECKBOX are multiple UI Elements inside a StackPanel

What emulator with what version of Visual Studio 2017?

Image
This is not always clear. It took a while to figure out this thing. I had Visual Studio 2017 Version 15.5.4 and ran into some design time problems as described in my post. Following this question taking a suggestion from Stack Overflow, I installed Visual Studio 2017 15.5.6 skipping the suggested 15.5.5. It did help me to avoid the design time problem for a UWP project I was working on. I also updated it to version 15.5.7. When I tried to view my app on an emulator, I did not find an emulator having used the latest version of Visual Studio in the deployment configuration. . Earlier I did not have this is problem before the upgrade. Every time , I try to use an emulator to look at my app, I am lead to a Microsoft site for downloading an emulator. According to UWP Forum on MSDN, there is no hard and fast rule for, ' What emulator with What version of Visual Studio 2017 '. It is more to do with the version you are targeting and the build. You can find this kind of i

Race is on for more cameras on Smart Phones

Nokia with HMD Global is setting the stage for a Smart Phone with 5 cameras in a circular format supported by two LED flash. Nokia will probably announce this on Feb 15th ahead of MWC 2018 global event (Barcelona on February 25). According to this site , "Multiple reports suggest that HMD Global will launch Nokia 9 and Android Oreo (Go Edition) based Nokia 1. Apart from these two phones, the company is also said to launch the Nokia 4, Nokia 7, Nokia 8 (2018) and the 4G LTE-enabled model of the Nokia 3310 feature phone" Huawei is rumored to follow (with P-20 phone) next this band wagon.

Upgrade your Visual Studio 2017 Community to version 15.5.6

Image
Release Date: January 29, 2018 - Visual Studio 2017 version 15.5.6. You can down load this version ( vs_community__279966789.1515294072 ) from here: https://www.visualstudio.com/downloads/ The earlier version (15.5.4) came up with some design time errors as shown. UIError.png Also review this site ( came from an answer to my question on StackExchange). After upgrading to version 15.5.6. The error is gone. UIErrorgone.png The upgrade took over an hour to install! Here is the list of updates (from Microsoft site). 15.5.6 Installed.

UWP: XAML's ComboBox Control - Part 2

Image
In Part 1 , you added after following a few tasks the following to a  Blank UWP project. Getting the ComboBox Control Placing ComboBox on the Design area Adding ComboBoxItems ComboBox 4 In this post you will write code for an app consisting of a ComboBox , a Button and a TextBox so that when you select an item in the ComboBox and click the button, the selected item appears in the TextBox. We already have a ComboBox with three items. We will drag a BUTTON and a TEXTBOX from the Toolbox ComboBox_8 And drop on the DESIGN pane as shown. The XAML markup is shown in the XAML Pane as shown. ComboBox_9 We want to Select a ComboBoxItem and then click the BUTTON . This should get displayed in the TEXTBOX . We add a click EVENT to the button by typing-in Click inside the BUTTON code as shown and choose 'NEW EVENT HANDLER'. ComboBox_10 It will be named 'Button_Click ' as shown. ComboBox_11 The following will be added to the MainPage

UWP: XAML's ComboBox Control -Part 1

Image
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. You can also use UWP for cross-platform use. 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.  ComboBox details can be seen in the Object Explorer of Visual Studio 2017 Community used in writing this post. In this post, I will show you how you may work with this controls for a UWP project. Getting the ComboBox Control Placing ComboBox on the Design area Adding ComboBoxItems We start with a Windows Universal blank C# project with the name JComboBox as shown. You will be asked for what target and minimum versions of Windows 10 that you want. The higher the version the more feature support. The Build version 16299 is chosen for both as shown i

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 in the next image, you insert ' SelectionCh