Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you set the ToastSettings in an object and pass to toastService? #258

Open
MSIH opened this issue Jun 8, 2024 · 0 comments
Open

Can you set the ToastSettings in an object and pass to toastService? #258

MSIH opened this issue Jun 8, 2024 · 0 comments
Labels
Question Question about this project Triage Issue needs to be triaged

Comments

@MSIH
Copy link

MSIH commented Jun 8, 2024

This does not work

var message = "This is a message sent from the C# method.";
var toastSettings = new ToastSettings
{
Position = Blazored.Toast.Configuration.ToastPosition.TopCenter
};

toastService.ShowInfo(message, toastSettings);

But this does?

toastService.ShowInfo(message, settings => { settings.Position = Blazored.Toast.Configuration.ToastPosition.TopCenter; });

@MSIH MSIH added Question Question about this project Triage Issue needs to be triaged labels Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Question about this project Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant