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

[12.0] Redo TimePicker/DatePicker templates #17515

Open
maxkatz6 opened this issue Nov 15, 2024 · 2 comments
Open

[12.0] Redo TimePicker/DatePicker templates #17515

maxkatz6 opened this issue Nov 15, 2024 · 2 comments

Comments

@maxkatz6
Copy link
Member

Is your feature request related to a problem? Please describe.

TimePicker/DatePicker styling is problematic, being way too reliant on template parts, and styling deeply baked into C# code.
Any third-party theme can be broken easily by minor improvements in these controls.

Describe the solution you'd like

  1. Reduce template parts to minimum
  2. Use TemplateBinding as much as possible, keeping styling logic in XAML template only
  3. If needed, introduce some kind of TimePickerTemplateSettings class, with readonly properties of pre-computed values useful in XAML template. Something like https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/SplitView/SplitViewTemplateSettings.cs

Describe alternatives you've considered

No response

Additional context

No response

@maxkatz6 maxkatz6 added this to the 12.0 milestone Nov 15, 2024
@maxkatz6 maxkatz6 changed the title [12.0] Redo TimePicker/DatePicker styling [12.0] Redo TimePicker/DatePicker templates Nov 15, 2024
@robloo
Copy link
Contributor

robloo commented Nov 15, 2024

Yea, this is a common issue with UWP controls. They didn't get the memo on how to design proper lookless controls.

Resizing of the DatePicker and TimePicker has been a longstanding issue. It has a very large minimum horizontal width it shouldn't have. Any redesign needs to make the control responsive to smaller widths as well.

@rabbitism
Copy link
Contributor

I cannot remember clearly, but there was a mysterious item height baked in the code and it will crash if I set it to a specific number (36 or 40 maybe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants