MahApps / MahApps/MahApps.Metro
Make Timepicker easier to customize
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.8k
- Forks
- 2.4k
- Avg merge
- 1h 2m
- Merged PRs (30d)
- 56
Description
## Describe the feature
I want to increase the popup size of the TimePicker (maybe even override it in future). For example, this is easily achievable with the Calendar control:
```XAML
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Calendar}">
<Viewbox Height="450" Width="450">
<Grid x:Name="PART_Root"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Background="Transparent">
<CalendarItem x:Name="PART_CalendarItem"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Style="{TemplateBinding CalendarItemStyle}" />
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
```
However, it’s much harder with the TimePicker. First of all, you can't do this:
```
```
The problem is that `MahApps.Styles.TimePickerBase` is missing.
Second, I’d like to have more modularity. For example, it would be great if the popup could have a separate style that you could easily override, like:
```
<mah:TimePicker PopupStyle={...}>
```
Otherwise, you need to copy and paste the entire `DateTimePicker.xaml`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting DateTimePicker.xaml and the existing TimePicker styling, then compare it with the Calendar template shown in the issue. Define how a reusable TimePickerBase and separately overridable popup style would fit the current templates; done means users can resize and customize the popup without copying the entire DateTimePicker.xaml.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100