Learning Windows Phone7 development together (23th Windows Phone7 Toolkit addendum)

Source: Internet
Author: User

After writing the control before the windows phone7 toolkit, I dropped the two very important controls. For Date Picker and Time Picker, they are actually two controls that I need very much, I have always regretted that Microsoft did not provide it in the early days, but now it has come out, but it has fallen...

DatePicker

This control selects the time control, but the UI on windows phone7 changes a lot. This control can also change the background and text position.

<Toolkit: DatePicker Margin = "41,121, "Name =" datePicker1 "verticalignment =" Top "Height =" 77 "Foreground =" White "HorizontalContentAlignment =" Center "ValueChanged =" datePicker1_ValueChanged ">

<Toolkit: DatePicker. Background>

<ImageBrush ImageSource = "Image/hkd16.jpg"/>

</Toolkit: DatePicker. Background>

</Toolkit: DatePicker>

Private void datePicker1_ValueChanged (object sender, DateTimeValueChangedEventArgs e)
{
E. NewDateTime; // The date selected.
E. OldDateTime; // the original date
}

 

TimerPicker

This control is used to select the time. After you click it, a ChooseTime page is displayed to select the time. Similarly, a ValueChanged event is triggered to obtain the selected time.

<Toolkit: TimePicker HorizontalAlignment = "Left" Margin = "92,275, 302" Name = "timePicker1" verticalignment = "Top" Width = "" ValueChanged = "timePicker1_ValueChanged"/>

In addition, you can set ValueStringFormat to display the time in different formats. However, because Silverlight does not have this attribute and there are no relevant instructions, you do not know how to set it.

 

 

Here, we can see that there is no button image on the Applicationbar after the two controls enter the settings. In fact, this is the case. You need to add a button image to your project. Should this be a bug? Add the Toolkit. Content folder in the project, and put the images of the two buttons. Can these two pictures be downloaded to http://www.52winphone.com/bbs/viewthread.php on my website? Tid = 35 & extra = page % 3D1 toolkit. controls. If you do not want to use these two buttons, you can use the same name.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.