This repository was archived by the owner on Feb 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathDropShadowPanel.Metadata.cs
More file actions
65 lines (57 loc) · 2.77 KB
/
Copy pathDropShadowPanel.Metadata.cs
File metadata and controls
65 lines (57 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
using Microsoft.VisualStudio.DesignTools.Extensibility;
using Microsoft.VisualStudio.DesignTools.Extensibility.Features;
using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
using Microsoft.VisualStudio.DesignTools.Extensibility.Model;
using Microsoft.VisualStudio.DesignTools.Extensibility.PropertyEditing;
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
internal class DropShadowPanelDefaults : DefaultInitializer
{
public override void InitializeDefaults(ModelItem item)
{
item.Properties[nameof(DropShadowPanel.BlurRadius)].SetValue(5d);
}
}
internal class DropShadowPanelMetadata : AttributeTableBuilder
{
public DropShadowPanelMetadata()
: base()
{
AddCallback(ControlTypes.DropShadowPanel,
b =>
{
b.AddCustomAttributes(new FeatureAttribute(typeof(DropShadowPanelDefaults)));
b.AddCustomAttributes(nameof(DropShadowPanel.BlurRadius),
new PropertyOrderAttribute(PropertyOrder.Early),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.ShadowOpacity),
new PropertyOrderAttribute(PropertyOrder.Early),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.Color),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetX),
new PropertyOrderAttribute(PropertyOrder.Late),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetY),
new PropertyOrderAttribute(PropertyOrder.Late),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetZ),
new PropertyOrderAttribute(PropertyOrder.Late),
new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
}
);
}
}
}