Customize your messagebox
Repo ZjzMisaka/CustomizableMessageBox, read from GitHub 1 min ago. ZjzMisaka has not joined Take My Repo.
ZjzMisaka/CustomizableMessageBox is a public repo on GitHub by ZjzMisaka. Customize your messagebox. It declares the WTFPL license on GitHub. It is written mainly in C#, has 15 stars and last changed on 2023-06-14. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
中文ReadMe
Change the appearance and controls of the messagebox and customize your messagebox.
CustomizableMessageBox is available as Nuget Package now.
The return value is MessageBoxResult.
MessageBox.Show("message"); MessageBox.Show("message", "title", MessageBoxButton.OKCancel, MessageBoxImage.Question);
The return value is int, and the value is the index in the parameter button list.
MessageBox.Show(new RefreshList { "btn1" }, "msg"); MessageBox.Show(new RefreshList { new ButtonSpacer(250), "btn1", "btn2", "btn3", "btn4", "btn5", new ButtonSpacer(30) }, "msg", "title", MessageBoxImage.Asterisk);
MessageBox.ButtonPanelColor = new MessageBoxColor("red"); MessageBox.WindowMinHeight = 300; MessageBox.MessageFontSize = 22; MessageBox.Show(new RefreshList { "btn1" }, "msg");
PropertiesSetter ps0 = new PropertiesSetter(); ps0.ButtonBorderThickness = new Thickness(10); ps0.MessagePanelColor = new MessageBoxColor(Colors.Black); PropertiesSetter ps1 = new PropertiesSetter(ps0); ps1.MessagePanelBorderThickness = new Thickness(10, 0, 0, 0); ps1.ButtonBorderColor = new MessageBoxColor("#222DDD"); ps1.MessageFontFamily = new FontFamily("Times New Roman"); ps1.CloseTimer = new MessageBoxCloseTimer(10, -1);
MessageBox.Show(ps0, "message", "title", MessageBoxButton.OKCancel, MessageBoxImage.Question); MessageBox.Show(ps1, new RefreshList { "btn1" }, "msg");
MessageBox.PropertiesSetter = ps1; MessageBox.Show(new RefreshList { new TextBox(), "btn1" }, "msg");
The button action can be set in a general way, or it can be directly set in the parameters of the RefreshList in the Show function using the lambda expression. After setting, it will be bound to the previous button of the List.
Insert a ButtonSpacer instance at the corresponding position in the passed in RefreshList. Constructor parameter can be null, width information, span column information.
Insert an instance of a FrameworkElement-derived class at the corresponding position in the passed-in RefreshList to display the corresponding control at the corresponding position.
The column width is determined by the width of the inserted control.
int result = MessageBox.Show(new RefreshList { new TextBox(), "btn1", "btn2" }, "msg"); TextBox tb = (TextBox)MessageBox.ButtonList[0]; MessageBox.Show(tb.Text == string.Empty ? "User did not enter" : tb.Text, (string)MessageBox.ButtonList[result]);
| MessageBox Properties | Type | Meaning | Is Static | Status |
|---|---|---|---|---|
| DefaultProperties | PropertiesSetter | Default style properties | √ | √ |
| TitleText | string | Set / Get Title Text | √ | √ |
| MessageText | string | Set / Get Message Text | √ | √ |
| ButtonList | RefreshList | Set / Get Button List | √ | √ |
| LockHeight | bool | Whether the height of the locked window is not allowed to grow automatically | √ | √ |
| TextWrappingMode | TextWrapping | Wrap style of message paragraph | √ | √ |
| WindowWidth | double | Window width | √ | √ |
| WindowMinHeight | double | Window minimum (initial) height | √ | √ |
| TitleFontFamily | FontFamily | Title text font | √ | √ |
| MessageFontFamily | FontFamily | Message text font | √ | √ |
| ButtonFontFamily | FontFamily | Button text font | √ | √ |
| TitleFontSize | int | Title text size | √ | √ |
| MessageFontSize | int | Message text size | √ | √ |
| ButtonFontSize | int | Button text size | √ | √ |
| TitleFontColor | MessageBoxColor | Title text color | √ | √ |
| MessageFontColor | MessageBoxColor | Message text color | √ | √ |
| ButtonFontColor | MessageBoxColor | Button text color | √ | √ |
| WindowOpacity | double | The overall transparency of the window | √ | √ |
| TitleBarOpacity | double | Title area transparency | √ | √ |
| MessageBarOpacity | double | Message area transparency | √ | √ |
| ButtonBarOpacity | double | Button area transparency | √ | √ |
| TitlePanelColor | MessageBoxColor | Title area background color | √ | √ |
| MessagePanelColor | MessageBoxColor | Message area background color | √ | √ |
| ButtonPanelColor | MessageBoxColor | Button area background color | √ | √ |
| WndBorderColor | MessageBoxColor | Window border color | √ | √ |
| TitlePanelBorderColor | MessageBoxColor | Title area border color | √ | √ |
| MessagePanelBorderColor | MessageBoxColor | Message area border color | √ | √ |
| ButtonPanelBorderColor | MessageBoxColor | Button area border color | √ | √ |
| ButtonBorderColor | MessageBoxColor | Button border color | √ | √ |
| WndBorderThickness | MessageBoxColor | Window border width | √ | √ |
| TitlePanelBorderThickness | Thickness | Title area border width | √ | √ |
| MessagePanelBorderThickness | Thickness | Message area border width | √ | √ |
| ButtonPanelBorderThickness | Thickness | Button area border width | √ | √ |
| ButtonBorderThickness | Thickness | Button border width | √ | √ |
| WindowShowDuration | Duration | Window fade time | √ | √ |
| WindowShowAnimations | List<KeyValuePair<DependencyProperty, AnimationTimeline>> | Window display animation | √ | √ |
| WindowCloseAnimations | List<KeyValuePair<DependencyProperty, AnimationTimeline>> | Window close animation | √ | √ |
| TitlePanelSpacing | double | Title area spacing | √ | √ |
| MessagePanelSpacing | double | Message area spacing | √ | √ |
| CloseIcon | BitmapImage | Custom close icon | √ | √ |
| TitleIcon | BitmapImage | Custom title icon | √ | √ |
| WarningIcon | BitmapImage | Custom warning icon | √ | √ |
| ErrorIcon | BitmapImage | Custom error icon | √ | √ |
| InfoIcon | BitmapImage | Custom information icon | √ | √ |
| QuestionIcon | BitmapImage | Custom question Icon | √ | √ |
| MessgaeIconHeight | double | Message icon height | √ | √ |
| CloseIconHeight | double | Close icon height | √ | √ |
| TitleIconHeight | double | Title icon height | √ | √ |
| SetCloseIconHeightAsTitleFontHeight | bool | The height of the close icon follows the title font height | √ | √ |
| SetTitleIconHeightAsTitleFontHeight | bool | The height of the title icon follows the title font height | √ | √ |
| EnableCloseButton | bool | Enable window close button | √ | √ |
| EnableTitleIcon | bool | Enable title icon | √ | √ |
| ButtonStyleList | List<Style> | Button action style | √ | √ |
| ButtonWidthList | List<double> | - | √ | √ |
| ButtonHeightList | List<double> | - | √ | √ |
| ButtonHorizontalAlignmentList | List<HorizontalAlignment> | - | √ | √ |
| ButtonVerticalAlignmentList | List<VerticalAlignment> | - | √ | √ |
| ButtonHorizontalContentAlignmentList | List<HorizontalAlignment> | - | √ | √ |
| ButtonVerticalContentAlignmentList | List<VerticalAlignment> | - | √ | √ |
| ButtonMarginList | List<Thickness> | - | √ | √ |
| ButtonPaddingList | List<Thickness> | - | √ | √ |
| ButtonBackgroundList | List<Brush> | - | √ | √ |
| ButtonBorderBrushList | List<Brush> | - | √ | √ |
| ButtonBorderThicknessList | List<Thickness> | - | √ | √ |
| ButtonCursorList | List<Cursor> | - | √ | √ |
| ButtonFontFamilyList | List<FontFamily> | - | √ | √ |
| ButtonFontSizeList | List<double> | - | √ | √ |
| ButtonFontStretchList | List<FontStretch> | - | √ | √ |
| ButtonFontStyleList | List<FontStyle> | - | √ | √ |
| ButtonFontWeightList | List<FontWeight> | - | √ | √ |
| CloseTimer | MessageBoxCloseTimer | Window timing / Close now | √ | √ |
| MessageBoxImageType | MessageBoxImage | Set the type of icon displayed | √ | √ |
| LoadedEventHandler | RoutedEventHandler | Loaded event | √ | √ |
| KeyDownEventHandler | KeyEventHandler | KeyDown event | √ | √ |
| KeyUpEventHandler | KeyEventHandler | KeyUp event | √ | √ |
| MessageBox function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| Show (string, string, MessageBoxButton, MessageBoxImage) | Call up the message window in compatible form | Message, Title (optional), Button type (optional), Icon type (optional) | MessageBoxResult | √ |
| Show (RefreshList, string, string, MessageBoxImage) | Customize the message window | Button list, message, title (optional), icon type (optional) | int | √ |
| Show (PropertiesSetter, string, string, MessageBoxButton, MessageBoxImage) | Call the message window in a compatible form and use the existing style | style, message, title (optional), button type (optional), icon type (optional) | MessageBoxResult | √ |
| Show (PropertiesSetter, RefreshList, string, string, MessageBoxImage) | Customize the message window, and use the existing style | style, style, button list, message, title (optional), icon type (optional) | int | √ |
| CloseNow () | Close window immediately | √ | ||
| CloseNow (int) | Close window immediately | Result of MessageBox | √ |
| MessageBoxColor Property | Meaning | Type |
|---|---|---|
| color | Color value | object |
| colorType | Color Type | ColorType |
| MessageBoxColor function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| MessageBoxColor (object) | Constructor | Hex color code string or instance of Color class or color name string | × | |
| MessageBoxColor (object, ColorType) | Constructor | Hexadecimal color code string or instance of Color class or color name string, ColorType enumeration value | × | |
| GetSolidColorBrush () | Output the SolidColorBrush corresponding to this instance color instance | SolidColorBrush | × |
| MessageBoxCloseTimer Property | Meaning | Type |
|---|---|---|
| timeSpan | Time to close window | TimeSpan |
| result | The return value returned after the window is closed | int |
| MessageBoxCloseTimer function | Meaning | Parameter | Return Value | Is Static |
|---|---|---|---|---|
| MessageBoxCloseTimer (TimeSpan, int) | Constructor | TimeSpan instance (time to close), return value returned after window close | × | |
| MessageBoxCloseTimer (int, int) | Constructor | seconds to close, return value after window close | × |
| PropertiesSetter Properties | Meaning |
|---|---|
| Omitted (Refer to the MessageBox property) |
| PropertiesSetter Function | Meaning | Parameter | Return Value | Is Static |
|---|---|---|---|---|
| PropertiesSetter () | Constructor | × | ||
| PropertiesSetter (PropertiesSetter) | Constructor | An existing PropertiesSetter instance | × |
| ButtonSpacer Properties | Meaning | Type |
|---|---|---|
| length | Leave blank length | double |
| ButtonSpacer function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| ButtonSpacer () | Constructor | × | ||
| ButtonSpacer (bool) | Constructor | whether to do row merging with the previous element | × | |
| ButtonSpacer (double) | Constructor | space length | × | |
| ButtonSpacer (double, bool) | Constructor | space length, whether to do row merging with the previous element | × | |
| ButtonSpacer (double, GridUnitType) | Constructor | Describes the value that a GridLength object is holding, Describes the kind of value that a GridLength object is holding | × | |
| ButtonSpacer (double, GridUnitType, bool) | Constructor | Describes the value that a GridLength object is holding, Describes the kind of value that a GridLength object is holding, whether to do row merging with the previous element | × |
| Info Properties | Meaning | Type |
|---|---|---|
| StackException | Stack with Reported Exception | Stack<Exception> |
| IsLastShowSucceed | Whether the last call was successful | bool |
| Info function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| PrintLog (MessageBoxType) | Call MessageBox to display exception information | Type of MessageBox (custom or system) | bool | √ |
| PrintLog (string, bool, bool) | Output exception information to a text file | Path to output text, Whether to keep the contents of the stack, Whether to append the end of the file | bool | √ |
| GetPropertiesSetter function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| GetPropertiesSetter (PropertiesSetterName) | Get the pre-made PropertiesSetter | Enum | PropertiesSetter | √ |
| GetButonStyle function | Meaning | Parameter | Return value | Is Static |
|---|---|---|---|---|
| GetButonStyle (ButtonStyleName) | Get the pre-made ButonStyle | Enum | Style | √ |
ZjzMisaka/CustomizableMessageBox is a public repo on GitHub by ZjzMisaka. Customize your messagebox.
It declares the WTFPL license on GitHub.
Its maker tagged it for Windows. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2023-06-14. GitHub counts 2 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
A beautiful replacement for JavaScript's "alert"
A modern file manager that helps users organize their files and folders.
✨ A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. 🇺🇦🇪🇺
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
A comprehensive and efficient low-contention thread pool for easily managing both sync and async workloads. It provides granular work control, flexible concurrency, and robust error handling.

Watch demos&povs, simulate actions in CSGO competition. - 观看demo和pov, 模拟CSGO竞技中的动作.
Perform batch reading, analysis, and output operations of Excel by executing pre-written c# scripts.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/ZjzMisaka/CustomizableMessageBoxTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.