Rename CornerRadius to ShadowCornerRadius - the native control has property named CornerRadius with latest versions

This commit is contained in:
atanas.popatanasov 2021-05-13 11:37:53 +03:00
Родитель eebad81ded
Коммит 7e2972597b
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -56,10 +56,10 @@ namespace Telerik.UI.Xaml.Controls.Primitives
DependencyProperty.Register(nameof(Content), typeof(object), typeof(RadShadow), new PropertyMetadata(null, new PropertyChangedCallback((d, e) => ((RadShadow)d).Invalidate()))); DependencyProperty.Register(nameof(Content), typeof(object), typeof(RadShadow), new PropertyMetadata(null, new PropertyChangedCallback((d, e) => ((RadShadow)d).Invalidate())));
/// <summary> /// <summary>
/// Identifies the <see cref="CornerRadius"/> dependency property. /// Identifies the <see cref="ShadowCornerRadius"/> dependency property.
/// </summary> /// </summary>
public static readonly DependencyProperty CornerRadiusProperty = public static readonly DependencyProperty ShadowCornerRadiusProperty =
DependencyProperty.Register(nameof(CornerRadius), typeof(double), typeof(RadShadow), new PropertyMetadata(0.0d, new PropertyChangedCallback((d, e) => ((RadShadow)d).OnCornerRadiusPropertyChanged()))); DependencyProperty.Register(nameof(ShadowCornerRadius), typeof(double), typeof(RadShadow), new PropertyMetadata(0.0d, new PropertyChangedCallback((d, e) => ((RadShadow)d).OnShadowCornerRadiusPropertyChanged())));
private const string PartShadowName = "PART_Shadow"; private const string PartShadowName = "PART_Shadow";
@ -134,10 +134,10 @@ namespace Telerik.UI.Xaml.Controls.Primitives
/// <summary> /// <summary>
/// Gets or sets the corner radius of the shadow. /// Gets or sets the corner radius of the shadow.
/// </summary> /// </summary>
public double CornerRadius public double ShadowCornerRadius
{ {
get { return (double)this.GetValue(CornerRadiusProperty); } get { return (double)this.GetValue(ShadowCornerRadiusProperty); }
set { this.SetValue(CornerRadiusProperty, value); } set { this.SetValue(ShadowCornerRadiusProperty, value); }
} }
/// <summary> /// <summary>
@ -228,7 +228,7 @@ namespace Telerik.UI.Xaml.Controls.Primitives
this.OnOffsetPropertyChanged(); this.OnOffsetPropertyChanged();
this.OnBlurRadiusPropertyChanged(); this.OnBlurRadiusPropertyChanged();
this.OnShadowOpacityPropertyChanged(); this.OnShadowOpacityPropertyChanged();
this.OnCornerRadiusPropertyChanged(); this.OnShadowCornerRadiusPropertyChanged();
this.shadowVisual.Shadow = this.dropShadow; this.shadowVisual.Shadow = this.dropShadow;
@ -296,17 +296,17 @@ namespace Telerik.UI.Xaml.Controls.Primitives
} }
} }
private void OnCornerRadiusPropertyChanged() private void OnShadowCornerRadiusPropertyChanged()
{ {
if (this.shadowView == null) if (this.shadowView == null)
{ {
return; return;
} }
var cornerRadius = this.CornerRadius; var cornerRadius = this.ShadowCornerRadius;
if (cornerRadius < 0) if (cornerRadius < 0)
{ {
throw new ArgumentException($"{cornerRadius} is an invalid value for {nameof(this.CornerRadius)}"); throw new ArgumentException($"{cornerRadius} is an invalid value for {nameof(this.ShadowCornerRadius)}");
} }
if (cornerRadius > 0) if (cornerRadius > 0)

Просмотреть файл

@ -102,7 +102,7 @@
ShadowOpacity="{Binding Opacity}" ShadowOpacity="{Binding Opacity}"
OffsetX="{Binding OffsetX}" OffsetX="{Binding OffsetX}"
OffsetY="{Binding OffsetY}" OffsetY="{Binding OffsetY}"
CornerRadius="{Binding CornerRadius}" ShadowCornerRadius="{Binding CornerRadius}"
BlurRadius="{Binding Blur}"/> BlurRadius="{Binding Blur}"/>
</Grid> </Grid>
</Grid> </Grid>