<UserControl x:Class="ControlExplorer.Controls.Calendar.CustomData"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:calendar="using:C1.Xaml.Calendar"
    xmlns:local="using:ControlExplorer.Controls.Calendar"
    d:DesignHeight="480" d:DesignWidth="480">
    
    <UserControl.Resources>
        <local:EventsToStringConverter x:Key="EventsToStringConverter"/>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" >
        <calendar:C1Calendar x:Name="cal1" Background="#66000000"
            Margin="4" MaxHeight="520"
            MaxSelectionCount="14" DoubleTapped="cal1_DoubleTapped">
            <calendar:C1Calendar.BoldedDaySlotTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock Margin="2" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="{StaticResource TextStyleSmallFontSize}" FontWeight="Bold" TextWrapping="Wrap" >
                            <Run Text="{Binding DataSource, Converter={StaticResource EventsToStringConverter}}"/>
                        </TextBlock>
                        <TextBlock Text="{Binding}" Margin="4" VerticalAlignment="Bottom"/>
                    </Grid>
                </DataTemplate>
            </calendar:C1Calendar.BoldedDaySlotTemplate>
        </calendar:C1Calendar>
    </Grid>
</UserControl>
