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

Exceptions thrown on message enqueue #11

Open
ASutrick opened this issue Feb 29, 2024 · 0 comments
Open

Exceptions thrown on message enqueue #11

ASutrick opened this issue Feb 29, 2024 · 0 comments

Comments

@ASutrick
Copy link

ASutrick commented Feb 29, 2024

On my MainWindowViewModel I have the following functions defined:

public void ShowSuccessMessage(string message)
{
    Manager.CreateMessage()
       .Foreground("#000000")
       .Background("#5BF58B")
       .HasMessage(message)
       .Dismiss().WithDelay(TimeSpan.FromSeconds(5))
       .Queue();
}
public void ShowErrorMessage(string message)
{ 
    Manager.CreateMessage()
        .Foreground("#000000")
        .Background("#F55B5B")
        .HasMessage(message)
        .Dismiss().WithDelay(TimeSpan.FromSeconds(5))
        .Queue();
}

The notifications pop up and dismiss as expected. When I check debug output, I see that every time a notification is queued the following exceptions are thrown multiple times:
"[Binding]Error in binding to 'Avalonia.Controls.TextBlock'.'Background': 'Null value in expression '{empty}' at ''.'(TextBlock)",
"[Binding]Error in binding to 'Avalonia.Controls.TextBlock'.'Foreground': 'Null value in expression '{empty}' at ''.'(TextBlock )"

It doesn't cause a crash and the back/foreground color is correct. I was wondering if anyone else is getting these, or if its an issue with how I set it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant