Solved

C# Timepicker Tool

Posted on 2016-10-02
2
19 Views
Last Modified: 2016-11-09
I am not getting value of time in textbox from the following? Any idea?


private void TimePicker_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            TimePicker mytimepicker = new TimePicker();
            textBox.Text = mytimepicker.Value.ToString();
        }
0
Comment
Question by:zia khan
2 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 500 total points
ID: 41825300
Yup, cause you don't read the value from the existing time picker, but from a new one.

E.g.
private void TimePicker_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
	TimePicker timePicker = (TimePicker)sender;
	textBox.Text = timePicker.Value.ToString();
} 

Open in new window

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question