Calendar-Wpf 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Calendar-Wpf --version 1.1.1
                    
NuGet\Install-Package Calendar-Wpf -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Calendar-Wpf" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Calendar-Wpf" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Calendar-Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Calendar-Wpf --version 1.1.1
                    
#r "nuget: Calendar-Wpf, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Calendar-Wpf@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Calendar-Wpf&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Calendar-Wpf&version=1.1.1
                    
Install as a Cake Tool

Calendar-Wpf

Calendar-Wpf is a reusable, customizable calendar/date picker control for WPF applications targeting .NET 8. It provides a modern, user-friendly interface for date selection, supporting month and year navigation, and is designed for easy integration into your WPF projects.


Features

  • Modern WPF Calendar Control
    Intuitive UI for selecting dates, with support for month and year navigation.
  • Bindable Properties
    • SelectedDate: The currently selected date (bindable).
    • DateFormatText: The formatted date string (bindable).
    • AllowFutureDate: Option to allow or restrict selection of future dates.
  • Customizable Appearance
    Built with XAML for easy styling and theming.
  • Event Support
    • SelectedDateChanged: Event raised when the selected date changes.
  • Keyboard and Mouse Support
    Interact with the calendar using mouse or keyboard.
  • No External Dependencies
    Pure WPF/XAML and C#.

Getting Started

Prerequisites

  • .NET 8 SDK
  • Visual Studio 2022 or later

Installation

  1. Add the Calendar-Wpf project to your solution.
  2. Reference the project in your WPF application.

Usage

  1. Add the namespace to your XAML:xaml xmlns:local="clr-namespace:Calendar_Wpf" 2. Add the CalendarView control to your window or user control:xaml <local:CalendarView x:Name="myCalendarView" SelectedDate="{Binding MyDateProperty, Mode=TwoWay}" AllowFutureDate="False" /> 3. (Optional) Handle the SelectedDateChanged event in code-behind:```csharp myCalendarView.SelectedDateChanged += (s, e) ⇒ { // Handle date change };
    4. To reset the control use the Initialize method: For e.g. myCalendarView.Initialize(); in the code behind.
---

## Properties

| Property         | Type      | Description                                      |
|------------------|-----------|--------------------------------------------------|
| SelectedDate     | DateTime  | The currently selected date. Bindable.           |
| DateFormatText   | string    | The formatted date string. Bindable.             |
| AllowFutureDate  | bool      | Allow selection of future dates (default: false) |

---

## Events

| Event                | Description                                 |
|----------------------|---------------------------------------------|
| SelectedDateChanged  | Raised when the selected date is changed.   |

---

## Customization

- **Appearance**: Modify `CalendarView.xaml` for custom styles and templates.
- **Date Format**: Set or bind `DateFormatText` to control the displayed date format.
- **Icons/Fonts**: Replace icons or fonts in the `Resources` folder as needed.

---

## Example

## Attribution

<a href="https://www.flaticon.com/free-icons/calendar-day" title="calendar day icons">Calendar day icons created by Rakib Hassan Rahim - Flaticon</a>

<a href="https://www.flaticon.com">Flaticon</a>

## License

This project is licensed under the MIT License.

## Acknowledgments

- Built with WPF and .NET 8.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.7 202 9/22/2025
1.1.5 137 7/31/2025
1.1.3 159 6/25/2025
1.1.2 173 6/5/2025
1.1.1 169 6/3/2025
1.1.0 165 5/27/2025