
Message prompt
Often used for feedback prompts after active operations. The difference from Toast is that the latter is more passive reminder for system-level notifications
Component usage introduction:
1. Inject service MessageService
@inject MessageService MessageService
[Inject]
[NotNull]
private MessageService? MessageService { get; set; }
2. call its instance api
await MessageService.Show(new MessageOption()
{
Content = "This is a reminder message"
});
Appears from the top and automatically disappears after 4 seconds
Demo
Change the small icon on the left side of the message box by setting the Icon
property of MessageOption
Demo
Change the close button to appear on the right side of the message box by setting the ShowDismiss
property of MessageOption
Demo
Change the left border style of the message box by setting the ShowBar
property of MessageOption
Demo
Change the message box color by setting the Color
property of MessageOption
Demo
Specify the Message
component that has set the bottom display position by setting the component parameter of the MessageService
service
Demo
Attributes
MessageItem property
B station related video link
交流群