mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-22 00:46:48 +08:00
Refactor DataGridMenuFilterFlyout
Add OpenMotion and CloseMotion motion
This commit is contained in:
@@ -131,6 +131,7 @@ public class AbstractMotion : IMotion
|
||||
|
||||
protected virtual void ConfigureTransitions()
|
||||
{
|
||||
Transitions.Clear();
|
||||
var opacityTransition = new NotifiableDoubleTransition()
|
||||
{
|
||||
Duration = Duration,
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
using AtomUI.Data;
|
||||
using AtomUI.MotionScene;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Controls;
|
||||
|
||||
internal class DataGridMenuFilterFlyout : MenuFlyout
|
||||
{
|
||||
public DataGridMenuFilterFlyout()
|
||||
{
|
||||
OpenMotion = new SlideUpInMotion();
|
||||
CloseMotion = new SlideUpOutMotion();
|
||||
}
|
||||
|
||||
protected override Control CreatePresenter()
|
||||
{
|
||||
var presenter = new DataGridMenuFilterFlyoutPresenter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AtomUI.Data;
|
||||
using AtomUI.MotionScene;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Metadata;
|
||||
@@ -12,7 +13,9 @@ public class DataGridTreeFilterFlyout : Flyout
|
||||
public DataGridTreeFilterFlyout()
|
||||
{
|
||||
var itemCollectionType = typeof(ItemCollection);
|
||||
Items = (ItemCollection)Activator.CreateInstance(itemCollectionType, true)!;
|
||||
Items = (ItemCollection)Activator.CreateInstance(itemCollectionType, true)!;
|
||||
OpenMotion = new SlideUpInMotion();
|
||||
CloseMotion = new SlideUpOutMotion();
|
||||
}
|
||||
|
||||
protected override Control CreatePresenter()
|
||||
|
||||
Reference in New Issue
Block a user