mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-29 15:19:12 +08:00
Fix the DatePicker calling condition judgment problem
This commit is contained in:
@@ -45,7 +45,7 @@ internal class BaseCalendarDayButtonTheme : BaseControlTheme
|
||||
contentPresenter.Content = buttonLabel;
|
||||
BindUtils.RelayBind(calendarDayButton, BaseCalendarDayButton.ContentProperty, buttonLabel, TextBlock.TextProperty,
|
||||
input => input?.ToString());
|
||||
BindUtils.RelayBind(calendarDayButton, BaseCalendarDayButton.ForegroundProperty, buttonLabel, TextBlock.ForegroundProperty);
|
||||
BindUtils.RelayBind(contentPresenter, ContentPresenter.ForegroundProperty, buttonLabel, TextBlock.ForegroundProperty);
|
||||
|
||||
CreateTemplateParentBinding(contentPresenter, ContentPresenter.PaddingProperty,
|
||||
TemplatedControl.PaddingProperty);
|
||||
|
||||
@@ -35,16 +35,16 @@ internal class CalendarDayButtonTheme : BaseControlTheme
|
||||
VerticalContentAlignment = VerticalAlignment.Center,
|
||||
};
|
||||
|
||||
var buttonLabel = new TextBlock()
|
||||
var buttonLabel = new TextBlock
|
||||
{
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
};
|
||||
|
||||
contentPresenter.Content = buttonLabel;
|
||||
BindUtils.RelayBind(calendarDayButton, BaseCalendarDayButton.ContentProperty, buttonLabel, TextBlock.TextProperty,
|
||||
BindUtils.RelayBind(calendarDayButton, CalendarDayButton.ContentProperty, buttonLabel, TextBlock.TextProperty,
|
||||
input => input?.ToString());
|
||||
BindUtils.RelayBind(calendarDayButton, BaseCalendarDayButton.ForegroundProperty, buttonLabel, TextBlock.ForegroundProperty);
|
||||
BindUtils.RelayBind(contentPresenter, ContentPresenter.ForegroundProperty, buttonLabel, TextBlock.ForegroundProperty);
|
||||
|
||||
CreateTemplateParentBinding(contentPresenter, ContentPresenter.PaddingProperty,
|
||||
TemplatedControl.PaddingProperty);
|
||||
|
||||
@@ -284,7 +284,7 @@ internal class FlyoutStateHelper : AvaloniaObject
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Flyout.IsOpen)
|
||||
if (!Flyout.IsOpen && TopLevel.GetTopLevel(AnchorTarget) == args.Root)
|
||||
{
|
||||
if (OpenFlyoutPredicate is not null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user