Browse Source

Expanded HitTest regions of internal elements

Set Backgrounds to Transparent for various buttons in the control
templates to allow for expanded HitTest regions allowing for better
PointerOver and Clicking behavior
pull/1244/head
sdoroff 9 years ago
parent
commit
ebcaa0742c
  1. 2
      src/Avalonia.Themes.Default/CalendarDayButton.xaml
  2. 13
      src/Avalonia.Themes.Default/CalendarItem.xaml

2
src/Avalonia.Themes.Default/CalendarDayButton.xaml

@ -16,7 +16,7 @@
<Setter Property="Focusable" Value="False"/>
<Setter Property="Template">
<ControlTemplate>
<Panel>
<Panel Background="Transparent">
<Rectangle Name="TodayBackground"
Fill="{DynamicResource HighlightBrush}"/>

13
src/Avalonia.Themes.Default/CalendarItem.xaml

@ -35,7 +35,8 @@
<Style Selector="Button.Header">
<Setter Property="Template">
<ControlTemplate>
<Panel Cursor="Hand">
<Panel Cursor="Hand"
Background="Transparent">
<ContentControl Name="Content"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
@ -56,7 +57,8 @@
<Style Selector="Button.Previous">
<Setter Property="Template">
<ControlTemplate>
<Panel Cursor="Hand">
<Panel Cursor="Hand"
Background="Transparent">
<Path Name="IconPath"
Margin="14,-6,0,0"
Height="10"
@ -79,7 +81,8 @@
<Style Selector="Button.Next">
<Setter Property="Template">
<ControlTemplate>
<Panel Cursor="Hand">
<Panel Cursor="Hand"
Background="Transparent">
<Path Name="IconPath"
Margin="0,-6,14,0"
Height="10"
@ -105,7 +108,7 @@
Stretch="Fill"
VerticalAlignment="Top"
Height="22"/>
<Button Name="PreviousButton"
Classes="Previous"
Height="20"
@ -205,5 +208,5 @@
<Style Selector="CalendarItem:calendardisabled /template/ Rectangle#DisabledVisual">
<Setter Property="IsVisible" Value="True"/>
</Style>
</Styles>
Loading…
Cancel
Save