Files
Shrlalgo.RvKits/NeuWPF/NeoUI/Controls/Avatar.xaml.cs

41 lines
1.2 KiB
C#
Raw Normal View History

2025-08-20 12:10:35 +08:00
namespace NeoUI.Controls;
2025-08-12 23:08:54 +08:00
/// <summary>
/// 头像
/// </summary>
public class Avatar : ContentControl
{
/// <summary>
/// 圆角半径
/// </summary>
public static readonly DependencyProperty CornerRadiusProperty =
System.Windows.Controls.Border.CornerRadiusProperty
.AddOwner(
typeof(Avatar),
new FrameworkPropertyMetadata(default(CornerRadius), FrameworkPropertyMetadataOptions.Inherits));
/// <summary>
/// 伸展方式
/// </summary>
public static readonly DependencyProperty StretchProperty =
Viewbox.StretchProperty
.AddOwner(
typeof(Avatar),
new FrameworkPropertyMetadata(default(Stretch), FrameworkPropertyMetadataOptions.Inherits));
/// <summary>
/// 圆角半径
/// </summary>
public CornerRadius CornerRadius
{
get => (CornerRadius)GetValue(CornerRadiusProperty);
set => SetValue(CornerRadiusProperty, value);
}
/// <summary>
/// 伸展方式
/// </summary>
public Stretch Stretch { get => (Stretch)GetValue(StretchProperty); set => SetValue(StretchProperty, value); }
}