Skip to content

feat(Alert): add Alert component - #4128

Merged
corvinsz merged 16 commits into
MaterialDesignInXAML:masterfrom
corvinsz:feat/alert-component
Dec 5, 2026
Merged

corvinsz merged 16 commits into
MaterialDesignInXAML:masterfrom
corvinsz:feat/alert-component

Conversation

@corvinsz

@corvinsz corvinsz commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Adds a new Alert component which supports all variations of the semantic colors.
The variant of an Alert can be specified by setting the Severity property. I purposely didn't name the enum AlertSeverity, because I think the enum can have use cases of other components too.

Overview of the public Api:

[TemplatePart(Name = "PART_CloseButton", Type = typeof(ButtonBase))]
public class Alert : ContentControl
{
    public const string CloseButtonPartName = "PART_CloseButton";

    public Severity Severity { get; set; }
    public CornerRadius CornerRadius { get; set; }
    public object? Title { get; set; }
    public PackIconKind? IconKind { get; set; }
    public bool ShowCloseButton { get; set; }

    public event RoutedEventHandler CloseClick;
}
Light Dark
image image

@corvinsz
corvinsz marked this pull request as draft November 26, 2026 20:07
@corvinsz
corvinsz marked this pull request as ready for review November 29, 2026 09:51
Comment thread src/MaterialDesignThemes.Wpf/Alert.cs Resolved
Comment thread src/MaterialDesignThemes.Wpf/Alert.cs Resolved
Comment thread src/MaterialDesignThemes.Wpf/Alert.cs Resolved
@corvinsz
corvinsz merged commit 84fe9f9 into MaterialDesignInXAML:master Dec 5, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants