namespace Melskin.Controls; /// /// 头像 /// public class Avatar : ContentControl { /// /// 圆角半径 /// public static readonly DependencyProperty CornerRadiusProperty = System.Windows.Controls.Border.CornerRadiusProperty .AddOwner( typeof(Avatar), new FrameworkPropertyMetadata(default(CornerRadius), FrameworkPropertyMetadataOptions.Inherits)); /// /// 伸展方式 /// public static readonly DependencyProperty StretchProperty = Viewbox.StretchProperty .AddOwner( typeof(Avatar), new FrameworkPropertyMetadata(default(Stretch), FrameworkPropertyMetadataOptions.Inherits)); /// /// 圆角半径 /// public CornerRadius CornerRadius { get => (CornerRadius)GetValue(CornerRadiusProperty); set => SetValue(CornerRadiusProperty, value); } /// /// 伸展方式 /// public Stretch Stretch { get => (Stretch)GetValue(StretchProperty); set => SetValue(StretchProperty, value); } }