Skip to content

Clock improvements plus made DateTimePicker bindable.#27

Merged
ghost1372 merged 7 commits into
ghost1372:mainfrom
AlexanderBlackman:main
Jan 20, 2025
Merged

Clock improvements plus made DateTimePicker bindable.#27
ghost1372 merged 7 commits into
ghost1372:mainfrom
AlexanderBlackman:main

Conversation

@AlexanderBlackman

Copy link
Copy Markdown
Contributor

Clock Changes

  • Hour can now be picked without inadvertently changing the minute.
  • Private variable names have been made clearer.

DateTimePicker changes.

  • SelectedDateTime is now bindable, as it no longer needs both a date and time to be provided.
  • SelectedDateFormatted now uses the user's system locale. AFAIK, all date strings will still be 10 char long, so it won't mess up the visual design.

Future Suggestions (I can implement them, but you might not want them)

  • Maybe make the bubble around the selected hour smaller.
  • Maybe have an optional int property for MinuteIncrement, but this'd make dragging the clock hand seem less responsive

@ghost1372 ghost1372 merged commit b951c9a into ghost1372:main Jan 20, 2025
@ghost1372

Copy link
Copy Markdown
Owner

Hi @AlexanderBlackman
Thank you again for your great work.

Regarding changing the bubble size, HandyControl uses width/height 28 and I use 30. I don't think the bubble is big. but if it is big This can be easily fixed by overriding the ClockRadioButton style.

 <Style BasedOn="{StaticResource DefaultClockRadioButtonStyle}"
        TargetType="local:ClockRadioButton" />
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="20" />
</Style>

Do you mean that instead of the minuteHand moving 1 minute by 1 minute, it would move 5 minutes by 5 minutes, for example?

@AlexanderBlackman

Copy link
Copy Markdown
Contributor Author

Do you mean that instead of the minuteHand moving 1 minute by 1 minute, it would move 5 minutes by 5 minutes, for example?

Yes, to keep consistency with the vanilla TimePicker's MinuteIncrement property.

For example my appointment scheduler's uses a grid.row for every 5 minutes. I can do the rounding locally, so its not crucial.

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

Successfully merging this pull request may close these issues.

2 participants