TimePicker-Wpf
1.1.0
dotnet add package TimePicker-Wpf --version 1.1.0
NuGet\Install-Package TimePicker-Wpf -Version 1.1.0
<PackageReference Include="TimePicker-Wpf" Version="1.1.0" />
<PackageVersion Include="TimePicker-Wpf" Version="1.1.0" />
<PackageReference Include="TimePicker-Wpf" />
paket add TimePicker-Wpf --version 1.1.0
#r "nuget: TimePicker-Wpf, 1.1.0"
#:package TimePicker-Wpf@1.1.0
#addin nuget:?package=TimePicker-Wpf&version=1.1.0
#tool nuget:?package=TimePicker-Wpf&version=1.1.0
TimePicker-Wpf
A customizable WPF Time Picker control for .NET 8, supporting 12-hour (AM/PM) and 24-hour formats with hour, minute, and second selection. The control is designed for easy integration and flexible styling in your WPF applications.
Features
- 12-hour time selection (AM/PM)
- 24-hour time selection
- Select hours, minutes, and seconds
- Data binding support for selected value and DateTime
- Customizable appearance (font, colors, borders, etc.)
- Popup-based UI for compact display
- Format selection via
TimeFormatType
enum
Prerequisites
- .NET 8 SDK
- Visual Studio 2022 or later
Installation
- Add the
TimePicker-Wpf
nuget package to your WPF project.
Usage
Add the namespace to your XAML: xmlns:timepicker="clr-namespace:TimePicker_Wpf;assembly=TimePicker-Wpf"
Add the
ClockView
control to your window or user control:
<timepicker:ClockView SelectedValue="{Binding SelectedTimeString, Mode=TwoWay}" SelectedDateTime="{Binding SelectedDateTime, Mode=TwoWay}" FontFamily="Segoe UI" FontSize="14" ForegroundColor="Black" BackgroundColor="White" BorderBrushColor="Gray" BorderThickness="2" CornerRadius="5" TimeFormat="F_12Hour" />
- Bind to the
SelectedValue
(string, e.g. "03:15:45 PM") orSelectedDateTime
(DateTime) properties in your ViewModel.
Time Format Selection
The time picker supports both 12-hour (AM/PM) and 24-hour formats.
You can specify the desired format using the TimeFormat
property, which accepts values from the TimeFormatType
enum:
Customization
You can customize the appearance using the following dependency properties:
FontFamily
FontSize
ForegroundColor
BackgroundColor
BorderBrushColor
BorderThickness
CornerRadius
Events
SelectionChanged
: Raised when the time selection changes.
Methods
ResetTime()
: Resets the picker to the current system time.
License
This project is licensed under the MIT License.
Acknowledgments
- Built with WPF and .NET 8.
Attribution
Flaticon
Mobile app icons created by FACH - Flaticon
TimePicker-Wpf � The easy way to add a modern combobox to your WPF apps.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows10.0.26100 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows10.0.26100
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.1.0 | 147 | 6/5/2025 |