packages/MaterialDesignThemes.2.5.1/src/net45/RippleAssist.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Windows;
using System.Windows.Media;
namespace MaterialDesignThemes.Wpf
{
public static class RippleAssist
{
#region ClipToBound
public static readonly DependencyProperty ClipToBoundsProperty = DependencyProperty.RegisterAttached(
"ClipToBounds", typeof(bool), typeof(RippleAssist), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.Inherits));
public static void SetClipToBounds(DependencyObject element, bool value)
{
element.SetValue(ClipToBoundsProperty, value);
}
public static bool GetClipToBounds(DependencyObject element)
{
return (bool)element.GetValue(ClipToBoundsProperty);
}
#endregion
#region StayOnCenter
/// <summary>
/// Set to <c>true</c> to cause the ripple to originate from the centre of the
/// content. Otherwise the effect will originate from the mouse down position.
/// </summary>
public static readonly DependencyProperty IsCenteredProperty = DependencyProperty.RegisterAttached(
"IsCentered", typeof(bool), typeof(RippleAssist), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Inherits));
/// <summary>
/// Set to <c>true</c> to cause the ripple to originate from the centre of the
/// content. Otherwise the effect will originate from the mouse down position.
/// </summary>
/// <param name="element"></param>
/// <param name="value"></param>
public static void SetIsCentered(DependencyObject element, bool value)
{
element.SetValue(IsCenteredProperty, value);
}
/// <summary>
/// Set to <c>true</c> to cause the ripple to originate from the centre of the
/// content. Otherwise the effect will originate from the mouse down position.
/// </summary>
/// <param name="element"></param>
public static bool GetIsCentered(DependencyObject element)
{
return (bool)element.GetValue(IsCenteredProperty);
}
#endregion
#region disable
/// <summary>
/// Set to <c>True</c> to disable ripple effect
后面还有 62 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。