Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit d258c97

Browse files
authored
Merge pull request #494 from telerik/Nasko/shadow-radius
Rename CornerRadius to ShadowCornerRadius - the native control has property named CornerRadius with latest versions
2 parents eebad81 + 7e29725 commit d258c97

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Controls/Primitives/Primitives.UWP/Shadow/RadShadow.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public class RadShadow : RadControl
5656
DependencyProperty.Register(nameof(Content), typeof(object), typeof(RadShadow), new PropertyMetadata(null, new PropertyChangedCallback((d, e) => ((RadShadow)d).Invalidate())));
5757

5858
/// <summary>
59-
/// Identifies the <see cref="CornerRadius"/> dependency property.
59+
/// Identifies the <see cref="ShadowCornerRadius"/> dependency property.
6060
/// </summary>
61-
public static readonly DependencyProperty CornerRadiusProperty =
62-
DependencyProperty.Register(nameof(CornerRadius), typeof(double), typeof(RadShadow), new PropertyMetadata(0.0d, new PropertyChangedCallback((d, e) => ((RadShadow)d).OnCornerRadiusPropertyChanged())));
61+
public static readonly DependencyProperty ShadowCornerRadiusProperty =
62+
DependencyProperty.Register(nameof(ShadowCornerRadius), typeof(double), typeof(RadShadow), new PropertyMetadata(0.0d, new PropertyChangedCallback((d, e) => ((RadShadow)d).OnShadowCornerRadiusPropertyChanged())));
6363

6464
private const string PartShadowName = "PART_Shadow";
6565

@@ -134,10 +134,10 @@ public object Content
134134
/// <summary>
135135
/// Gets or sets the corner radius of the shadow.
136136
/// </summary>
137-
public double CornerRadius
137+
public double ShadowCornerRadius
138138
{
139-
get { return (double)this.GetValue(CornerRadiusProperty); }
140-
set { this.SetValue(CornerRadiusProperty, value); }
139+
get { return (double)this.GetValue(ShadowCornerRadiusProperty); }
140+
set { this.SetValue(ShadowCornerRadiusProperty, value); }
141141
}
142142

143143
/// <summary>
@@ -228,7 +228,7 @@ private void InitializeDropShadow()
228228
this.OnOffsetPropertyChanged();
229229
this.OnBlurRadiusPropertyChanged();
230230
this.OnShadowOpacityPropertyChanged();
231-
this.OnCornerRadiusPropertyChanged();
231+
this.OnShadowCornerRadiusPropertyChanged();
232232

233233
this.shadowVisual.Shadow = this.dropShadow;
234234

@@ -296,17 +296,17 @@ private void OnShadowOpacityPropertyChanged()
296296
}
297297
}
298298

299-
private void OnCornerRadiusPropertyChanged()
299+
private void OnShadowCornerRadiusPropertyChanged()
300300
{
301301
if (this.shadowView == null)
302302
{
303303
return;
304304
}
305305

306-
var cornerRadius = this.CornerRadius;
306+
var cornerRadius = this.ShadowCornerRadius;
307307
if (cornerRadius < 0)
308308
{
309-
throw new ArgumentException($"{cornerRadius} is an invalid value for {nameof(this.CornerRadius)}");
309+
throw new ArgumentException($"{cornerRadius} is an invalid value for {nameof(this.ShadowCornerRadius)}");
310310
}
311311

312312
if (cornerRadius > 0)

SDKExamples.UWP/Examples/Shadow/Configurations.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
ShadowOpacity="{Binding Opacity}"
103103
OffsetX="{Binding OffsetX}"
104104
OffsetY="{Binding OffsetY}"
105-
CornerRadius="{Binding CornerRadius}"
105+
ShadowCornerRadius="{Binding CornerRadius}"
106106
BlurRadius="{Binding Blur}"/>
107107
</Grid>
108108
</Grid>

0 commit comments

Comments
 (0)