This commit is contained in:
Stefan Nenchev 2020-02-24 16:28:08 +02:00
Родитель 1078084df4
Коммит af78166be7
3 изменённых файлов: 21 добавлений и 1 удалений

Просмотреть файл

@ -2,6 +2,9 @@
namespace Telerik.UI.Xaml.Controls.Input.Calendar.AutomationPeers
{
/// <summary>
/// AutomationPeer class for CalendarFooterControl.
/// </summary>
public class CalendarFooterControlAutomationPeer : RadControlAutomationPeer
{
/// <summary>

Просмотреть файл

@ -5,16 +5,22 @@ using Windows.UI.Xaml.Controls;
namespace Telerik.UI.Xaml.Controls.Input.Calendar
{
/// <summary>
/// Represents the footer panel of the calendar control.
/// </summary>
public class CalendarFooterControl : RadControl
{
/// <summary>
/// Identifies the <c cref=ButtonStyle"/> dependency property.
/// Identifies the <c cref="ButtonStyle"/> dependency property.
/// </summary>
public static readonly DependencyProperty ButtonStyleProperty =
DependencyProperty.Register(nameof(ButtonStyle), typeof(Style), typeof(CalendarFooterControl), new PropertyMetadata(null));
private Button calendarFooterButton;
/// <summary>
/// Initializes a new instance of the <see cref="CalendarFooterControl"/> class.
/// </summary>
public CalendarFooterControl()
{
this.DefaultStyleKey = typeof(CalendarFooterControl);
@ -37,6 +43,10 @@ namespace Telerik.UI.Xaml.Controls.Input.Calendar
internal RadCalendar Owner { get; set; }
/// <summary>
/// Called when the Framework <see cref="M:OnApplyTemplate" /> is called. Inheritors should override this method should they have some custom template-related logic.
/// This is done to ensure that the <see cref="P:IsTemplateApplied" /> property is properly initialized.
/// </summary>
protected override bool ApplyTemplateCore()
{
bool applied = base.ApplyTemplateCore();
@ -45,6 +55,9 @@ namespace Telerik.UI.Xaml.Controls.Input.Calendar
return applied;
}
/// <summary>
/// Occurs when the <see cref="M:OnApplyTemplate" /> method has been called and the template is already successfully applied.
/// </summary>
protected override void OnTemplateApplied()
{
base.OnTemplateApplied();
@ -54,6 +67,7 @@ namespace Telerik.UI.Xaml.Controls.Input.Calendar
}
}
/// <inheritdoc/>
protected override void UnapplyTemplateCore()
{
base.UnapplyTemplateCore();
@ -64,6 +78,7 @@ namespace Telerik.UI.Xaml.Controls.Input.Calendar
}
}
/// <inheritdoc/>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new CalendarFooterControlAutomationPeer(this);

Просмотреть файл

@ -268,6 +268,7 @@
<Setter Property="MinWidth" Value="47"/>
<Setter Property="Content" Value="+"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="AutomationProperties.Name" Value="CalendarFooterControlButton"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Foreground" Value="{ThemeResource TelerikCalendarFooterButtonForegroundBrush}" />
<Setter Property="Background" Value="{ThemeResource TelerikCalendarFooterButtonBackgroundBrush}" />
@ -398,6 +399,7 @@
<localCalendar:CalendarFooterControl x:Name="PART_FooterControl"
Grid.Row="2"
Canvas.ZIndex="-1"
Visibility="{TemplateBinding FooterVisibility}"/>
</Grid>
</Border>