Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimePicker : Set system hour #20

Closed
clementpoiret opened this issue May 16, 2015 · 7 comments
Closed

TimePicker : Set system hour #20

clementpoiret opened this issue May 16, 2015 · 7 comments
Assignees

Comments

@clementpoiret
Copy link

Hi, I'm trying to set at the startup of my application the system time to the TimePicker control.
I tryed TrainingTimePicker.SelectedTime = DateAndTime.Now (where TimePicker is my control) but it don't work, te field still empty.
Can I know why please ? I'm in VB.Net

@ButchersBoy
Copy link
Collaborator

What's not displaying correctly? The text box or the main picker?

@clementpoiret
Copy link
Author

The textbox is empty, I still have "Select time" :/
On real time debugging I have this : System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='' BindingExpression:Path=SelectedTime; DataItem='TimePicker' (Name=''); target element is 'Clock' (Name=''); target property is 'Time' (type 'DateTime')
capture d ecran 58
EDIT : Using TrainingTimePicker.SelectedTime = DateAndTime.Now, when I open the control, set the correct hour but don't show it in the textbox, it also set AM and PM at the same time (so it's not possible to change correctly the hour) :
capture d ecran 59

@ButchersBoy ButchersBoy self-assigned this May 17, 2015
@ButchersBoy
Copy link
Collaborator

Hi, I reproduced the issue...fix is just building, look-out for nuget package 0.0.0.65. Let me know if it solves it in your code base.

@clementpoiret
Copy link
Author

Thanks, I'll try this tomorrow and I say if it's corrected :)
Another issue on timepicker : changing the Foreground isn't changing the color of numbers so if I set dark theme on MahApps, I can't read the numbers, even with the line "TimePicker.Foreground = Brushes.Black" like in the screenshot
capture d ecran 64
[And is it possible to change the text inside the timepicker (the "Select Time") ? Because it's not the language of my application] Thank you so much ! Have a nice day !

@ButchersBoy
Copy link
Collaborator

re. "Select time". I'll get that added to the TextField.Hint thing so you can change it. I've added a new issue so you can track: #21

re. Colours...I've documented how to get MahApps using a Material Design palette, but I'll need to have a look at a nice way of making sure Material Design controls work nicely when using Mah Apps light/dark accents.

@clementpoiret
Copy link
Author

Every thing is working fine now ! Thank you so much, your work is amazing ! :D Where can I find the documentation to change the foreground of your controls ? DatePicker is working fine with DatePicker.Foreground = Brushes.Black but not the TimePicker

@ButchersBoy
Copy link
Collaborator

OK...if DatePicker is working butTimePicker not, I should be able to fix it easy. Log another issue so I don't forget and I'll get to it.

ButchersBoy pushed a commit that referenced this issue Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants