Skip to content

Fix MessageBox Button Icons#1164

Merged
pomianowski merged 2 commits intolepoco:developmentfrom
stepwise-alan:fix-messagebox
Jul 24, 2024
Merged

Fix MessageBox Button Icons#1164
pomianowski merged 2 commits intolepoco:developmentfrom
stepwise-alan:fix-messagebox

Conversation

@stepwise-alan
Copy link
Copy Markdown
Contributor

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently, setting the icon for MessageBox buttons using PrimaryButtonIcon, SecondaryButtonIcon, or CloseButtonIcon properties has no effect. The icons do not appear on the buttons.

Issue Number: N/A

What is the new behavior?

  • The PrimaryButtonIcon, SecondaryButtonIcon, and CloseButtonIcon properties now use IconElement instead of SymbolRegular.
  • Icons set using these properties are correctly displayed on the MessageBox buttons.

Other information

Before the change:

var uiMessageBox = new Wpf.Ui.Controls.MessageBox
{
    Title = "WPF UI Message Box",
    Content = "Never gonna give you up, never gonna let you down Never gonna run around and desert you Never gonna make you cry, never gonna say goodbye",
    CloseButtonIcon = SymbolRegular.Dismiss24
};
// The icon does not appear on the button.

After the change:

var uiMessageBox = new Wpf.Ui.Controls.MessageBox
{
    Title = "WPF UI Message Box",
    Content = "Never gonna give you up, never gonna let you down Never gonna run around and desert you Never gonna make you cry, never gonna say goodbye",
    CloseButtonIcon = new SymbolIcon(SymbolRegular.Dismiss24)
};
// The icon correctly appears on the button.

@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request gallery WPF UI Gallery dotnet labels Jul 23, 2024
@pomianowski
Copy link
Copy Markdown
Member

Hey @stepwise-alan, thanks for the work you've put in

@pomianowski pomianowski merged commit eabd654 into lepoco:development Jul 24, 2024
@stepwise-alan stepwise-alan deleted the fix-messagebox branch July 25, 2024 05:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

controls Changes to the appearance or logic of custom controls. dotnet gallery WPF UI Gallery PR Pull request styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants