feat: add Content Attribute.
This commit is contained in:
@@ -16,7 +16,9 @@
|
|||||||
<u:Notification Content="Hello, Ursa!" />
|
<u:Notification Content="Hello, Ursa!" />
|
||||||
</u:NotificationCard>
|
</u:NotificationCard>
|
||||||
<u:NotificationCard NotificationType="Error" Classes="Light">
|
<u:NotificationCard NotificationType="Error" Classes="Light">
|
||||||
<u:Notification Title="Welcome" Content="Hello, Ursa!" />
|
<u:Notification Title="Welcome">
|
||||||
|
Hello, Ursa!
|
||||||
|
</u:Notification>
|
||||||
</u:NotificationCard>
|
</u:NotificationCard>
|
||||||
</ReversibleStackPanel>
|
</ReversibleStackPanel>
|
||||||
</ThemeVariantScope>
|
</ThemeVariantScope>
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
Hello, Ursa!
|
Hello, Ursa!
|
||||||
</u:ToastCard>
|
</u:ToastCard>
|
||||||
<u:ToastCard NotificationType="Success" Classes="Light">
|
<u:ToastCard NotificationType="Success" Classes="Light">
|
||||||
<u:Toast Content="Hello, Ursa!" />
|
<u:Toast>
|
||||||
|
Hello, Ursa!
|
||||||
|
</u:Toast>
|
||||||
</u:ToastCard>
|
</u:ToastCard>
|
||||||
</ReversibleStackPanel>
|
</ReversibleStackPanel>
|
||||||
</ThemeVariantScope>
|
</ThemeVariantScope>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Avalonia.Controls.Notifications;
|
using Avalonia.Controls.Notifications;
|
||||||
|
using Avalonia.Metadata;
|
||||||
|
|
||||||
namespace Ursa.Controls;
|
namespace Ursa.Controls;
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ public class Notification : INotification, INotifyPropertyChanged
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
[Content]
|
||||||
public string? Content
|
public string? Content
|
||||||
{
|
{
|
||||||
get => _content;
|
get => _content;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Avalonia.Controls.Notifications;
|
using Avalonia.Controls.Notifications;
|
||||||
|
using Avalonia.Metadata;
|
||||||
|
|
||||||
namespace Ursa.Controls;
|
namespace Ursa.Controls;
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@ public class Toast : IToast, INotifyPropertyChanged
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
[Content]
|
||||||
public string? Content
|
public string? Content
|
||||||
{
|
{
|
||||||
get => _content;
|
get => _content;
|
||||||
|
|||||||
Reference in New Issue
Block a user