mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
fix calendar wheel event handle issue
fix calendar wheel event handle issue
This commit is contained in:
parent
fba1c3117f
commit
dee0d3a7b4
@ -961,15 +961,30 @@ public class Calendar : TemplatedControl
|
||||
base.OnPointerWheelChanged(e);
|
||||
if (!e.Handled)
|
||||
{
|
||||
if (e.Delta.Y > 0)
|
||||
CalendarExtensions.GetMetaKeyState(e.KeyModifiers, out bool ctrl, out bool shift);
|
||||
|
||||
if (!ctrl)
|
||||
{
|
||||
OnNextMonthClick();
|
||||
if (e.Delta.Y > 0)
|
||||
{
|
||||
ProcessPageUpKey(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessPageDownKey(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OnPreviousMonthClick();
|
||||
if (e.Delta.Y > 0)
|
||||
{
|
||||
ProcessDownKey(ctrl, shift);
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessUpKey(ctrl, shift);
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
@ -1256,7 +1271,7 @@ public class Calendar : TemplatedControl
|
||||
{
|
||||
if (!shift)
|
||||
{
|
||||
OnNextClick();
|
||||
OnNextMonthClick();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1285,7 +1300,7 @@ public class Calendar : TemplatedControl
|
||||
{
|
||||
if (!shift)
|
||||
{
|
||||
OnPreviousClick();
|
||||
OnPreviousMonthClick();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user