packages/MaterialDesignThemes.2.5.1/src/net45/ShadowAssist.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
namespace MaterialDesignThemes.Wpf
{
public enum ShadowDepth
{
Depth0,
Depth1,
Depth2,
Depth3,
Depth4,
Depth5
}
[Flags]
public enum ShadowEdges
{
None = 0,
Left = 1,
Top = 2,
Right = 4,
Bottom = 8,
All = Left | Top | Right | Bottom
}
internal class ShadowLocalInfo
{
public ShadowLocalInfo(double standardOpacity)
{
StandardOpacity = standardOpacity;
}
public double StandardOpacity { get; }
}
public static class ShadowAssist
{
public static readonly DependencyProperty ShadowDepthProperty = DependencyProperty.RegisterAttached(
"ShadowDepth", typeof (ShadowDepth), typeof (ShadowAssist), new FrameworkPropertyMetadata(default(ShadowDepth), FrameworkPropertyMetadataOptions.AffectsRender));
public static void SetShadowDepth(DependencyObject element, ShadowDepth value)
{
element.SetValue(ShadowDepthProperty, value);
}
public static ShadowDepth GetShadowDepth(DependencyObject element)
{
return (ShadowDepth) element.GetValue(ShadowDepthProperty);
}
private static readonly DependencyPropertyKey LocalInfoPropertyKey = DependencyProperty.RegisterAttachedReadOnly(
"LocalInfo", typeof (ShadowLocalInfo), typeof (ShadowAssist), new PropertyMetadata(default(ShadowLocalInfo)));
private static void SetLocalInfo(DependencyObject element, ShadowLocalInfo value)
{
element.SetValue(LocalInfoPropertyKey, value);
后面还有 77 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
