Files
community/Ink Canvas/Windows/SettingsViews/SettingsViews/AdvancedPanel.xaml.cs
T
2025-12-28 08:48:09 +08:00

35 lines
953 B
C#

using System;
using System.Windows;
using System.Windows.Controls;
namespace Ink_Canvas.Windows.SettingsViews
{
/// <summary>
/// AdvancedPanel.xaml 的交互逻辑
/// </summary>
public partial class AdvancedPanel : UserControl
{
public AdvancedPanel()
{
InitializeComponent();
}
public event EventHandler<RoutedEventArgs> IsTopBarNeedShadowEffect;
public event EventHandler<RoutedEventArgs> IsTopBarNeedNoShadowEffect;
private void ScrollViewerEx_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
var scrollViewer = (ScrollViewer)sender;
if (scrollViewer.VerticalOffset >= 10)
{
IsTopBarNeedShadowEffect?.Invoke(this, new RoutedEventArgs());
}
else
{
IsTopBarNeedNoShadowEffect?.Invoke(this, new RoutedEventArgs());
}
}
}
}