Browse Source

Merge branch 'master' into fix/xaml-errors

pull/6020/head
Max Katz 5 years ago
committed by GitHub
parent
commit
7b4dbf17cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Avalonia.Controls/DateTimePickers/DatePicker.cs
  2. 4
      src/Avalonia.Controls/DateTimePickers/TimePicker.cs
  3. 2
      src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs

4
src/Avalonia.Controls/DateTimePickers/DatePicker.cs

@ -2,6 +2,7 @@
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Shapes;
using Avalonia.Controls.Templates;
using Avalonia.Data;
using Avalonia.Interactivity;
using System;
using System.Collections.Generic;
@ -88,7 +89,8 @@ namespace Avalonia.Controls
/// </summary>
public static readonly DirectProperty<DatePicker, DateTimeOffset?> SelectedDateProperty =
AvaloniaProperty.RegisterDirect<DatePicker, DateTimeOffset?>(nameof(SelectedDate),
x => x.SelectedDate, (x, v) => x.SelectedDate = v);
x => x.SelectedDate, (x, v) => x.SelectedDate = v,
defaultBindingMode: BindingMode.TwoWay);
// Template Items
private Button _flyoutButton;

4
src/Avalonia.Controls/DateTimePickers/TimePicker.cs

@ -2,6 +2,7 @@
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Shapes;
using Avalonia.Controls.Templates;
using Avalonia.Data;
using System;
using System.Globalization;
@ -44,7 +45,8 @@ namespace Avalonia.Controls
/// </summary>
public static readonly DirectProperty<TimePicker, TimeSpan?> SelectedTimeProperty =
AvaloniaProperty.RegisterDirect<TimePicker, TimeSpan?>(nameof(SelectedTime),
x => x.SelectedTime, (x, v) => x.SelectedTime = v);
x => x.SelectedTime, (x, v) => x.SelectedTime = v,
defaultBindingMode: BindingMode.TwoWay);
// Template Items
private TimePickerPresenter _presenter;

2
src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs

@ -117,7 +117,7 @@ namespace Avalonia.Win32
{
var visual = window.Renderer.HitTestFirst(position, _owner as Window, x =>
{
if (x is IInputElement ie && !ie.IsHitTestVisible)
if (x is IInputElement ie && (!ie.IsHitTestVisible || !ie.IsVisible))
{
return false;
}

Loading…
Cancel
Save