DateTimePickerCustomNet6 3.0.0
dotnet add package DateTimePickerCustomNet6 --version 3.0.0
NuGet\Install-Package DateTimePickerCustomNet6 -Version 3.0.0
<PackageReference Include="DateTimePickerCustomNet6" Version="3.0.0" />
paket add DateTimePickerCustomNet6 --version 3.0.0
#r "nuget: DateTimePickerCustomNet6, 3.0.0"
// Install DateTimePickerCustomNet6 as a Cake Addin #addin nuget:?package=DateTimePickerCustomNet6&version=3.0.0 // Install DateTimePickerCustomNet6 as a Cake Tool #tool nuget:?package=DateTimePickerCustomNet6&version=3.0.0
DateTimePickerCustom
This projects contains a LibraryClass for a C# WPF application project. The library implements a DateTiemPicker, which besides the date picking has along side a time picking widgets.
Extented documenetations and comments for easy modifications and styling. Appropriate for a dropdown or popup widget for returning a DateTime value to a textbox, or for a stand-alone calander widget.
Table of Contents
Features
- LibraryClass for a DateTimePicker. All the logic is located in the code behind, which is heavily commented for easy understanding and modification.
- Therefore, the .xaml file is clean and contains only the styles (which will be moved in a different file in the next update) and the grid layout.
- The DatePicker, TimePicker and PopupWidget are independent components.
- The project solution has a WPF application connected to the library for testing the LibraryClass.
In this Update the Popup widget is intergrated as an indepented feature, so you can inlude the popup only with a single tag. See Usage for explaining the Popup functionality
In this update the OK button will send DateTime info to the Textblock of the Popup. The static variables, ResultDate and ResultTime can be used for reading-only the TextBlock DateTime data anywhere in your classes. See Usage for an example.
Installation
Method 1. NuGet
- Download using Nuget Package manager.
- In the Solution Manager, under dependancies there should be a DateTimePickerCustom.dll file.
- Include that file in your WPF Application by using the following line.
xmlns:[YourNamespace]="clr-namespace:DateTimePickerCustom;assembly=DateTimePickerCustom"
Method 2. GitHub
- Clone Github repository and add the LibraryClass to your solution.
- This is how the solution tree in the solution explorer should look like, if you add a test WPF application.
- Right-Click on the WPF application Project in the solution explorer and Add → Project Reference
- Importing the LbraryClass to the WPF aaplication using the lines with the gray arrow.
Usage
Besides a stand-alone calander, its a great and stylized solution for a Date and Time Picker as a Popup for a TextBlock Date and time selection.
Here is how to include the Popup element in your project (after installing the package).
Here is how to use the values of the Popup (also storde in the Popup TextBlock), in your project.
Contributing
If you would like to contribute to the project, I would love hearing from you. I message in github or in my e-mail.
License
MIT-license
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. |
-
net6.0-windows7.0
- 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.
In this release, a Popup widget with DateTime picker Widget is available. Also static variables for getting the popup text anywhere.