{"id":15091034,"url":"https://github.com/tomaszrewak/messageboxpositionmanager","last_synced_at":"2026-02-15T03:03:22.943Z","repository":{"id":125409503,"uuid":"310921599","full_name":"TomaszRewak/MessageBoxPositionManager","owner":"TomaszRewak","description":"A small library that moves all newly created MessageBoxes to the center of their owner forms.","archived":false,"fork":false,"pushed_at":"2021-02-09T21:30:46.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-28T03:22:59.963Z","etag":null,"topics":["center","messagebox","windowsforms","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomaszRewak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-07T19:57:10.000Z","updated_at":"2021-02-09T21:31:03.000Z","dependencies_parsed_at":"2023-05-14T19:00:28.720Z","dependency_job_id":null,"html_url":"https://github.com/TomaszRewak/MessageBoxPositionManager","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"70fbb7a0f2fe4e552c32a24c39d4bd88117e0da3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TomaszRewak/MessageBoxPositionManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomaszRewak%2FMessageBoxPositionManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomaszRewak%2FMessageBoxPositionManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomaszRewak%2FMessageBoxPositionManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomaszRewak%2FMessageBoxPositionManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomaszRewak","download_url":"https://codeload.github.com/TomaszRewak/MessageBoxPositionManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomaszRewak%2FMessageBoxPositionManager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278713173,"owners_count":26032838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["center","messagebox","windowsforms","wpf"],"created_at":"2024-09-25T10:35:09.963Z","updated_at":"2025-10-07T03:14:05.288Z","avatar_url":"https://github.com/TomaszRewak.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MessageBoxPositionManager\n\nA small library that moves all newly created MessageBoxes to the center of their owner forms.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://repository-images.githubusercontent.com/310921599/dc308600-21ef-11eb-8a35-4a18f3b97094\" width=800/\u003e\n\u003c/p\u003e\n\nWorks well with both the `System.Windows.MessageBox` (WPF) and the `System.Windows.Forms.MessageBox` (WindowsForms).\n\nTo set it up simply install the package (`dotnet add package MessageBoxPositionManager`) and call the following static method from your UI thread (once, during the startup of your app):\n\n```csharp\nMessageBoxCenteringService.Initialize();\n```\n\nLater on, you can simply use the `MessageBox.Show` method to display new modals. No additional code is required to move the windows around.\n\nIf a MessageBox is attached to an owner, it will be rendered in a center of that window.\n\n```csharp\nMessageBox.Show(this, \"Some content\", \"Title\");\n```\n\nIf a MessageBox is displayed without an owner, it will be rendered in a center of the currently active window or the center of the screen if no window is currently active.\n\n```csharp\nMessageBox.Show(\"Some content\", \"Title\");\n```\n\nThe package was create based on the ideas collected from [this StackOveflow thread](https://stackoverflow.com/questions/1732443/center-messagebox-in-parent-form).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaszrewak%2Fmessageboxpositionmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaszrewak%2Fmessageboxpositionmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaszrewak%2Fmessageboxpositionmanager/lists"}