| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using SWRIS.Dtos;
- using System.Collections.ObjectModel;
- using System.Windows;
- using System.Windows.Controls;
- namespace SWRIS.Controls
- {
- /// <summary>
- /// NotificationBar.xaml 的交互逻辑
- /// </summary>
- public partial class NotificationBar : UserControl
- {
- public NotificationBar()
- {
- InitializeComponent();
- }
- public static readonly DependencyProperty MessagesProperty =
- DependencyProperty.Register("Messages", typeof(ObservableCollection<FaultsMessageDto>), typeof(NotificationBar),
- new PropertyMetadata(null));
- public ObservableCollection<FaultsMessageDto> Messages
- {
- get { return (ObservableCollection<FaultsMessageDto>)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); }
- }
- }
- }
|