Thursday, 27 August 2015

About some controls in Visual studio

In this blog let us discuss about some more controls in our windows store applications using Visual studio. As we already gone through with some of the controls like text block, text box, button, and image control. We also gone through with the events generated by using the control. You can refer these above controls in my previous blogs. Now we are going to get some knowledge about some of the controls like password box, date picker and timer picker in our windows store applications. 

Follow the below instructions in order to use these controls in your applications. 
  • Open Visual studio and start a new windows store blank application. 
  • We can drag and drop our required controls from the tool box directly to our UI design. 
  • Just drag and drop password box, date picker, timer picker in to the design. 
  • We can edit the names of these controls, layout and design properties of the control. 






The main use of password box is to hide the given input in the editor. This editor looks similar to the text box. This password box has the main feature of hiding the text and displaying the dots instead of text. You can also see these type of password inputs while we login in to some particular website. This is mainly to protect our secret key in order to maintain personal information. We can also say this password is used to authenticate our files. We can find Place holder text property in the property window of password box control. While we write some text in that particular text box the text is displayed in the password box. When we start editing our password box it disappears. So this place holder text is a hint to the user to instruct something required to the application. You can also see the example of this place holder text in the below image. 

So we are done with the password box. Now let us discuss about date picker and time picker. We mostly need these controls in our applications to represent the required date and time with respect to the application requirements. We can use this picker to choose the required date and time like birthdays. Now we try to display the selected date and time that should be displayed in the text block. So we should drag and drop our controls from our tool box when they are required. So after inserting two text blocks generate event for date and time. We should select date changed and time changed event to display the selected date and time. After generating events write the below code displayed in the image 




When you execute the above code you can see the below output. When you change the date and time in the control it reflects in the text block.

No comments:

Post a Comment