# Quick Start: Display a C1Calendar Control

## Content



This section describes how to add a C1Calendar control to your android application and select a date on the calendar at runtime. This topic comprises of two steps:

*   [Step 1: Add a Calendar control](/componentone/docs/xamarin/online-android/controls/CalendarOverview/CalendarQuickStart#step-1-add-a-calendar-control)
*   [Step 2: Run the project](/componentone/docs/xamarin/online-android/controls/CalendarOverview/CalendarQuickStart#step2)

The following image shows how C1Calendar appears after completing the above steps.

![](https://cdn.mescius.io/document-site-files/images/b011ec9b-8b9c-49b7-96b6-ebd2d5673a5e/images/calendar-overview.png)

[](/componentone/docs/xamarin/online-android/controls/CalendarOverview/CalendarQuickStart#step2)

### Step 1: Add a Calendar control

To add C1Calendar control to your layout, open the .axml file in your layout folder from the Solution Explorer and replace its code with the code below.

```XML
<?xml version="1.0" encoding="utf-8"?>
<C1.Android.Calendar.C1Calendar xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/Calendar" />
```

Alternatively, you can drag a C1Calendar control from the Toolbox within the custom control tab onto your layout surface in designer mode.

![](https://cdn.mescius.io/document-site-files/images/b011ec9b-8b9c-49b7-96b6-ebd2d5673a5e/images/calendar-designer.png)

Then, inside your activity, add the following code to the OnCreate method to initialize your layout.

```csharp
protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            SetContentView(Resource.Layout.GettingStarted);
        }
```

#### Step 2: Run the project

Press **F5** to run the application.