MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Snackbar DeactivateStoryboardCompletedEvent Bug

Open
#2,562 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug evaluation required
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

I think this is a bug...

**.../MaterialDesignThemes.Wpf/Snackbar.cs**

```

public static readonly RoutedEvent DeactivateStoryboardCompletedEvent = EventManager.RegisterRoutedEvent(
nameof(DeactivateStoryboardCompleted), RoutingStrategy.Bubble, typeof(SnackbarMessageEventArgs), typeof(Snackbar));

public event RoutedPropertyChangedEventHandler DeactivateStoryboardCompleted
{
add => AddHandler(DeactivateStoryboardCompletedEvent, value);
remove => RemoveHandler(DeactivateStoryboardCompletedEvent, value);
}

private static void OnDeactivateStoryboardCompleted(IInputElement snackbar, SnackbarMessage message)
{
var args = new SnackbarMessageEventArgs(DeactivateStoryboardCompletedEvent, message);
snackbar.RaiseEvent(args);
}

```

Prompt type mismatch when I register events...

I didn't look at all the code. Maybe it's right?

```

public static readonly RoutedEvent DeactivateStoryboardCompletedEvent = EventManager.RegisterRoutedEvent(
nameof(DeactivateStoryboardCompleted), RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(Snackbar));

public event RoutedPropertyChangedEventHandler DeactivateStoryboardCompleted
{
add => AddHandler(DeactivateStoryboardCompletedEvent, value);
remove => RemoveHandler(DeactivateStoryboardCompletedEvent, value);
}

private static void OnDeactivateStoryboardCompleted(IInputElement snackbar, SnackbarMessage message)
{
var snackbarMessageEventArgs = new SnackbarMessageEventArgs(DeactivateStoryboardCompletedEvent, snackbar, message);
var args = new RoutedPropertyChangedEventArgs(snackbarMessageEventArgs, snackbarMessageEventArgs, DeactivateStoryboardCompletedEvent);
snackbar.RaiseEvent(args);
}

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MaterialDesignThemes.Wpf/Snackbar.cs and inspect the DeactivateStoryboardCompleted event registration, delegate declaration, and OnDeactivateStoryboardCompleted call together. Check the WPF routed-event types involved and build the project to confirm the reported type mismatch is resolved without introducing another event-signature error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.