Skip to content

Exceptions thrown on message enqueue #11

Open
@ASutrick

Description

@ASutrick

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions