MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Snackbar DeactivateStoryboardCompletedEvent Bug
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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