Skip to content

Commit 928d20b

Browse files
author
KB Bot
committed
Added new kb article calendar-add-custom-space-footer
1 parent 4b97602 commit 928d20b

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Adding a Custom Panel Between Dates Area and Footer in UI for WinForms Calendar
3+
description: Learn how to add a custom panel between the dates area and footer in the [UI for WinForms Calendar](https://docs.telerik.com/devtools/winforms/controls/calendar/calendar).
4+
type: how-to
5+
page_title: Create a Custom Space Above the Footer in WinForms Calendar
6+
meta_title: Create a Custom Space Above the Footer in WinForms Calendar
7+
slug: calendar-add-custom-space-footer
8+
tags: calendar, ui for winforms, customization, footer, panel
9+
res_type: kb
10+
ticketid: 1566694
11+
---
12+
13+
## Environment
14+
15+
|Product Version|Product|Author|
16+
|----|----|----|
17+
|2025.3.812|RadCalendar for WinForms|[Dinko Krastev](https://www.telerik.com/blogs/author/dinko-krastev)|
18+
19+
## Description
20+
21+
In this tutorial, we will demonstrate how to add a custom panel above the elements inside the footer (where the `<Today>` button resides) in the [UI for WinForms Calendar](https://docs.telerik.com/devtools/winforms/controls/calendar/calendar). This panel can be populated with additional buttons that, when clicked, can select a specific date in the calendar.
22+
23+
## Solution
24+
25+
To create a custom space above the footer, use a `StackLayoutElement` and add it to the `CalendarStatusElement.Children` collection. Follow these steps:
26+
27+
Here is an example:
28+
29+
````C#
30+
31+
public Form1()
32+
{
33+
InitializeComponent();
34+
this.radCalendar1.ShowFooter = true; // Enable the footer
35+
36+
// Create a panel and set its orientation
37+
StackLayoutElement panel = new StackLayoutElement();
38+
panel.Orientation = Orientation.Horizontal;
39+
40+
// Add child elements to the panel
41+
RadButtonElement btn1 = new RadButtonElement() { Text = "btn1" };
42+
RadButtonElement btn2 = new RadButtonElement() { Text = "btn2" };
43+
RadButtonElement btn3 = new RadButtonElement() { Text = "btn3" };
44+
panel.Children.Add(btn1);
45+
panel.Children.Add(btn2);
46+
panel.Children.Add(btn3);
47+
48+
// Dock the panel at the top of the footer area
49+
DockLayoutPanel.SetDock(panel, Telerik.WinControls.Layouts.Dock.Top);
50+
51+
// Insert the panel into the footer's children collection
52+
this.radCalendar1.CalendarElement.CalendarStatusElement.Children[0].Children.Insert(0, panel);
53+
}
54+
55+
````
56+
57+
You can subscribe to the Click event on each button and add your custom logic in the event handlers, then further manipulate the RadCalendar dates. Customize the `StackLayoutElement` further to match your requirements.
58+
59+
## See Also
60+
61+
* [UI for WinForms Calendar Overview](https://docs.telerik.com/devtools/winforms/controls/calendar/calendar)
62+
* [Calendar Footer](https://docs.telerik.com/devtools/winforms/controls/calendar/features/footer)

0 commit comments

Comments
 (0)