Skip to content
Discussion options

You must be logged in to vote

This is a cool one, but a bit of a rabbit hole.

What you're seeing atm is the "replace" workflow, where the OS violently rips out the previous notification and displays a brand new one. It can be... jarring if you do them fast enough.

foreach ($Number in 1..100) {
    $ProgressBar = New-BTProgressBar -Status 'Running' -Value ($Number / 100)

    $ToastSplat = @{
        Text             = 'Demo Replacement'
        UniqueIdentifier = 'DemoReplace'
        ProgressBar      = $ProgressBar
    }
    New-BurntToastNotification @ToastSplat

    Start-Sleep -Seconds 1
}

Instead of that, what you can do it "update" the existing notification. This requires using "databindings", basically a hasht…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pcgeek86
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants