35 lines
953 B
C#
35 lines
953 B
C#
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace Ink_Canvas.Windows.SettingsViews
|
|
{
|
|
/// <summary>
|
|
/// GesturesPanel.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class GesturesPanel : UserControl
|
|
{
|
|
public GesturesPanel()
|
|
{
|
|
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());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|