packages/MaterialDesignThemes.2.5.1/src/net45/Converters/ShadowInfo.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media.Effects;
namespace MaterialDesignThemes.Wpf.Converters
{
internal static class ShadowInfo
{
private static readonly IDictionary<ShadowDepth, DropShadowEffect> ShadowsDictionary;
static ShadowInfo()
{
var resourceDictionary = new ResourceDictionary { Source = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Shadows.xaml", UriKind.Absolute) };
ShadowsDictionary = new Dictionary<ShadowDepth, DropShadowEffect>
{
{ ShadowDepth.Depth0, null },
{ ShadowDepth.Depth1, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth1"] },
{ ShadowDepth.Depth2, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth2"] },
{ ShadowDepth.Depth3, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth3"] },
{ ShadowDepth.Depth4, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth4"] },
{ ShadowDepth.Depth5, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth5"] },
};
}
public static DropShadowEffect GetDropShadow(ShadowDepth depth)
{
return ShadowsDictionary[depth];
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。