using SWRIS.Dtos; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; namespace SWRIS.Controls { /// /// NotificationBar.xaml 的交互逻辑 /// public partial class NotificationBar : UserControl { public NotificationBar() { InitializeComponent(); } public static readonly DependencyProperty MessagesProperty = DependencyProperty.Register("Messages", typeof(ObservableCollection), typeof(NotificationBar), new PropertyMetadata(null)); public ObservableCollection Messages { get { return (ObservableCollection)GetValue(MessagesProperty); } set { SetValue(MessagesProperty, value); } } public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(NotificationBar), new PropertyMetadata(new CornerRadius(20, 20, 20, 20))); public CornerRadius CornerRadius { get { return (CornerRadius)GetValue(CornerRadiusProperty); } set { SetValue(CornerRadiusProperty, value); } } public static readonly DependencyProperty TextPaddingProperty = DependencyProperty.Register("TextPadding", typeof(Thickness), typeof(NotificationBar), new PropertyMetadata(new Thickness(15, 5, 10, 5))); public Thickness TextPadding { get { return (Thickness)GetValue(TextPaddingProperty); } set { SetValue(TextPaddingProperty, value); } } } }