Introduction
This is my first article covering Windows 10 application programming. This article introduces the sections of Input controls provided in Windows 10 as a part of the Windows Runtime API. Windows Runtime can be developed using XAML for UI. If you have ever developed an application using Windows Presentation Foundation or Windows 8 (Universal application concept) then you are already familiar with XAML programming.
I want to cover the most-used and required input controls that a developer commonly requires to build their GUI. For example, you might want to generate a form that uses the following.
- One or more input fields; text boxes
Input fields allow your users to enter free-form text. You can also add a mask to the input field! Such as in the case of phone numbers.
- Selection options; radio buttons
You can also provide your users with a few options to select a value from, radio buttons are one of them.
- Selection of a list; checkboxes
You can also allow your users to select multiple options to create a list.
- File selection; file selection dialog
You can use these objects to select a file from your file system. The Windows. Storage namespace plays a vital role.
I will cover these classes, objects, and methods. Also, a few how-to sections will be provided in this article. Continue reading for more.
Techniques for getting input
Nearly every application is designed in a way to get input from users, such as input ranges from mouse interactions and keyboard input. You can create controls, layouts and UI to allow users to provide you with feedback, input, response or whatever your application context wants to call it. But before you can create your own application, you must understand that user-experience rules apply to this field also. You cannot just create a form that is unclear to the user, that is hard for the user to use and provide you with feedback, or there are too many scrolls present in the UI.
You must keep your form very elegant, short and compact but still very helpful for yourself. You can create your own input form using my own tip of Five step form creation!

Form Creation
In this 5-step procedure of form creation, you are required to focus on Steps 1 and 4 as a developer. You should consider contacting your UI and UX teams for the remaining steps (Step 2 and 3). Step 5 is just the output. To generate multiple forms, you just need to change Step 2 Step 3, keeping Step 4 in mind. Step 4 would provide you with an idea of how users interact with controls. Step 2 and Step 3 are done by the UI or UX team. Your job (as a developer) is Step 1 and Step 5.
While developing a simple form, your application is exposed to many users. Some might be valuable users, some just guests and some might be looking for a loophole in your application. Although frameworks try to handle most scenarios where your application might be exploiting the data. But still, any potential user is able to provide some invalid input to break the logic. You need to ensure your application is resilient to such conditions. A very common example of such a scenario is when you ask your user to enter his age in a text box. Now, remember that a text box provides a string-type value. You would need to convert that value to an integer. Great, but what if the user enters non-numeric data? A Convert object won't be able to convert the data to an integer and would break your application. In such conditions, Step 2 tells you to not use a text box, Instead use, for example, a Calender object (XAML provides a Calender object) and get the date of birth of the user. Then calculating the age from the date of birth isn't a very tough job, right? :)
Similarly, some scenarios do not break your application. Instead, they simply cause a bad user experience. For example, for a rating control. You can use 5 radio buttons and provide the user with information that has value 5 that has 1. You can also do that by asking the user to enter a value (from the range 1-5), or you can provide the user with a Slider object, or you can use a ComboBox. All of them are valid and applicable controls. But they have some sort of bad user-experience in them. However, radio buttons are the best candidates (pun intended). There is no best control, just better controls.
Enough clarifications of good and bad user-experience for forms and feedback input options. It is your job as a developer to take care of users and their requirements. Try to create a form that is fully capable of providing you with the entire required feedback, but at the same time try to keep your form short. You can ask for some literature guy for this help, as to write short questions that fully provide the idea of what is being asked and the answer should be able to include everything that is required.





Vipul MalhotraPosted Jul 6, 2015, 4:50 PM
Nice
Santhakumar MunuswamyPosted Jul 6, 2015, 3:49 PM
Thanks for nice article. Keep it up
Sibeesh VenuPosted Jul 6, 2015, 3:17 AM
Good One.Thanks for sharing :)
Suraj SahooPosted Jul 6, 2015, 3:09 AM
Nice one dear Afzaal..:)
SharadPosted Jul 6, 2015, 3:03 AM
Nice Article...