Added automation peer and applied some small changes.
This commit is contained in:
Родитель
69804565cb
Коммит
4c1f744ab1
|
@ -0,0 +1,21 @@
|
|||
using Telerik.UI.Automation.Peers;
|
||||
|
||||
namespace Telerik.UI.Xaml.Controls.Input.Calendar.AutomationPeers
|
||||
{
|
||||
public class CalendarFooterControlAutomationPeer : RadControlAutomationPeer
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CalendarNavigationControlAutomationPeer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="owner">CalendarNavigationControl owner.</param>
|
||||
public CalendarFooterControlAutomationPeer(CalendarFooterControl owner) : base(owner)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override string GetLocalizedControlTypeCore()
|
||||
{
|
||||
return "calendar footer control";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
using Windows.UI.Xaml;
|
||||
using Telerik.UI.Xaml.Controls.Input.Calendar.AutomationPeers;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Automation.Peers;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Telerik.UI.Xaml.Controls.Input.Calendar
|
||||
|
@ -62,6 +64,11 @@ namespace Telerik.UI.Xaml.Controls.Input.Calendar
|
|||
}
|
||||
}
|
||||
|
||||
protected override AutomationPeer OnCreateAutomationPeer()
|
||||
{
|
||||
return new CalendarFooterControlAutomationPeer(this);
|
||||
}
|
||||
|
||||
private void CalendarFooterButtonClick(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
this.Owner.OnCalendarButtonClicked();
|
||||
|
|
|
@ -3697,7 +3697,7 @@ namespace Telerik.UI.Xaml.Controls.Input
|
|||
availableSize.Width -= this.BorderThickness.Left + this.BorderThickness.Right + this.Padding.Left + this.Padding.Right;
|
||||
availableSize.Height -= this.BorderThickness.Top + this.BorderThickness.Bottom + this.Padding.Top + this.Padding.Bottom;
|
||||
|
||||
if (this.navigationPanel != null)
|
||||
if (this.navigationPanel != null && this.HeaderVisibility == Visibility.Visible)
|
||||
{
|
||||
availableSize.Height -= this.navigationPanel.ActualHeight;
|
||||
}
|
||||
|
@ -3740,6 +3740,12 @@ namespace Telerik.UI.Xaml.Controls.Input
|
|||
navigationPanelHeight = this.navigationPanel.ActualHeight;
|
||||
}
|
||||
|
||||
double footerPanelHeight = 0d;
|
||||
if (this.footerPanel != null)
|
||||
{
|
||||
footerPanelHeight = this.footerPanel.ActualHeight;
|
||||
}
|
||||
|
||||
// NOTE: We need to be able to overlap the outer border of the control with the cell decoration visuals.
|
||||
// NOTE: We need to be able to display the hold clue visualization for the first row of cells properly (multiple selection)
|
||||
RectangleGeometry clip = new RectangleGeometry();
|
||||
|
@ -3747,7 +3753,7 @@ namespace Telerik.UI.Xaml.Controls.Input
|
|||
-this.BorderThickness.Left,
|
||||
-(this.BorderThickness.Top + navigationPanelHeight),
|
||||
(int)(this.calendarViewHost.ActualWidth + this.BorderThickness.Left + this.BorderThickness.Right + .5),
|
||||
(int)(this.calendarViewHost.ActualHeight + navigationPanelHeight + this.BorderThickness.Top + this.BorderThickness.Bottom + .5));
|
||||
(int)(this.calendarViewHost.ActualHeight + navigationPanelHeight + footerPanelHeight + this.BorderThickness.Top + this.BorderThickness.Bottom + .5));
|
||||
|
||||
this.calendarViewHost.Clip = clip;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
<Compile Include="AutoCompleteBox\AutomationPeers\RadAutoCompleteBoxAutomationPeer.cs" />
|
||||
<Compile Include="AutoCompleteBox\AutomationPeers\SuggestionItemAutomationPeer.cs" />
|
||||
<Compile Include="Calendar\AutomationPeers\CalendarCellInfoBaseAutomationPeer.cs" />
|
||||
<Compile Include="Calendar\AutomationPeers\CalendarFooterControlAutomationPeer.cs" />
|
||||
<Compile Include="Calendar\AutomationPeers\CalendarHeaderCellInfoAutomationPeer.cs" />
|
||||
<Compile Include="Calendar\AutomationPeers\CalendarInvokableCellInfoAutomationPeer.cs" />
|
||||
<Compile Include="Calendar\AutomationPeers\CalendarNavigationControlAutomationPeer.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче