Skip to content

Commit 75e53c9

Browse files
Rename Shadows.Attached to Effects.Shadow
1 parent f48df97 commit 75e53c9

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Shadows/AttachedShadowWin2DXaml.bind

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<Grid>
1313
<Button Content="Hello Shadows!" HorizontalAlignment="Center" VerticalAlignment="Center"
1414
CornerRadius="8">
15-
<ui:Shadows.Attached>
15+
<ui:Effects.Shadow>
1616
<media:AttachedCardShadow BlurRadius="@[BlurRadius:DoubleSlider:8.0:0.0-10.0]"
1717
CornerRadius="8"
1818
Color="@[Color:Brush:Black]"
1919
Offset="@[Offset:Vector3:16,16]"
2020
Opacity="@[Opacity:DoubleSlider:1.0:0.0-1.0]"/>
21-
</ui:Shadows.Attached>
21+
</ui:Effects.Shadow>
2222
</Button>
2323
</Grid>
2424
</Page>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/XamlOnlyPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<controls:ConstrainedBox x:Key="ConstrainedBoxControl" />
5252
<media:AttachedCardShadow x:Key="AttachedShadow" />
5353
<controls:DropShadowPanel x:Key="DropShadowPanel"
54-
ui:Shadows.Attached="{StaticResource AttachedShadow}" />
54+
ui:Effects.Shadow="{StaticResource AttachedShadow}" />
5555
</Page.Resources>
5656

5757
<Grid>

Microsoft.Toolkit.Uwp.UI/Shadows/Shadows.cs renamed to Microsoft.Toolkit.Uwp.UI/Shadows/Effects.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -9,33 +9,33 @@ namespace Microsoft.Toolkit.Uwp.UI
99
/// <summary>
1010
/// Helper class for attaching <see cref="AttachedShadowBase"/> shadows to <see cref="FrameworkElement"/>s.
1111
/// </summary>
12-
public static class Shadows
12+
public static class Effects
1313
{
1414
/// <summary>
15-
/// Gets the shadow attached to a <see cref="FrameworkElement"/> by getting the value of the <see cref="AttachedProperty"/> property.
15+
/// Gets the shadow attached to a <see cref="FrameworkElement"/> by getting the value of the <see cref="ShadowProperty"/> property.
1616
/// </summary>
1717
/// <param name="obj">The <see cref="FrameworkElement"/> the <see cref="AttachedShadowBase"/> is attached to.</param>
1818
/// <returns>The <see cref="AttachedShadowBase"/> that is attached to the <paramref name="obj">FrameworkElement.</paramref></returns>
19-
public static AttachedShadowBase GetAttached(FrameworkElement obj)
19+
public static AttachedShadowBase GetShadow(FrameworkElement obj)
2020
{
21-
return (AttachedShadowBase)obj.GetValue(AttachedProperty);
21+
return (AttachedShadowBase)obj.GetValue(ShadowProperty);
2222
}
2323

2424
/// <summary>
25-
/// Attaches a shadow to an element by setting the <see cref="AttachedProperty"/> property.
25+
/// Attaches a shadow to an element by setting the <see cref="ShadowProperty"/> property.
2626
/// </summary>
2727
/// <param name="obj">The <see cref="FrameworkElement"/> to attach the shadow to.</param>
2828
/// <param name="value">The <see cref="AttachedShadowBase"/> that will be attached to the element</param>
29-
public static void SetAttached(FrameworkElement obj, AttachedShadowBase value)
29+
public static void SetShadow(FrameworkElement obj, AttachedShadowBase value)
3030
{
31-
obj.SetValue(AttachedProperty, value);
31+
obj.SetValue(ShadowProperty, value);
3232
}
3333

3434
/// <summary>
3535
/// Attached <see cref="DependencyProperty"/> for setting an <see cref="AttachedShadowBase"/> to a <see cref="FrameworkElement"/>.
3636
/// </summary>
37-
public static readonly DependencyProperty AttachedProperty =
38-
DependencyProperty.RegisterAttached("Attached", typeof(AttachedShadowBase), typeof(Shadows), new PropertyMetadata(null, OnShadowChanged));
37+
public static readonly DependencyProperty ShadowProperty =
38+
DependencyProperty.RegisterAttached("Shadow", typeof(AttachedShadowBase), typeof(Effects), new PropertyMetadata(null, OnShadowChanged));
3939

4040
private static void OnShadowChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
4141
{

0 commit comments

Comments
 (0)