Skip to content

Commit

Permalink
update: inherit topmost from owner
Browse files Browse the repository at this point in the history
  • Loading branch information
emako committed Aug 15, 2024
1 parent 3766452 commit 152b376
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

WPF UI Violeta is based on [WPF UI](https://github.com/lepoco/wpfui), and provides the Fluent experience in your known and loved WPF framework. Some new immersive controls like `Toast`, `Flyout`, `ContentDialog`, `MessageBox` and etc.

Some idea or codes are ported from [ModernWpf](https://github.com/Kinnara/ModernWpf) and [Fischless](https://github.com/GenshinMatrix/Fischless).

When I decided to create this project I was listening to the song `Violeta`.

### 🚀 Getting started
Expand Down Expand Up @@ -116,6 +118,7 @@ Under construction

### Thanks

- [🔗 WPF-UI](https://github.com/lepoco/wpfui)
- [🔗 Fischless](https://github.com/GenshinMatrix/Fischless)
- [🔗 ModernWpf](https://github.com/Kinnara/ModernWpf)

6 changes: 6 additions & 0 deletions src/Wpf.Ui.Violeta/Controls/MessageBox/MessageBoxDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ private void UpdateMessageBoxButtonState()
public new MessageBoxResult ShowDialog()
{
base.ShowDialog();

if (Owner != null)
{
// Inherit the topmost state from the owner window
Topmost = Owner.Topmost;
}
return Result;
}

Expand Down

0 comments on commit 152b376

Please sign in to comment.