Browse Source
* ensure owner topmost flag is set if its topmost when showing a owned window * add comments on why HWND_TOPMOST is set again * add Topmost with owned window integration tests * fix testspull/16153/head
committed by
GitHub
7 changed files with 104 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||
|
<Window xmlns="https://github.com/avaloniaui" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
||||
|
x:Class="IntegrationTestApp.TopmostWindowTest" |
||||
|
Title="TopmostWindowTest" |
||||
|
Width="640" |
||||
|
Height="480"> |
||||
|
<Grid> |
||||
|
<TextBox Name="CurrentPosition" |
||||
|
Grid.Column="1" |
||||
|
Grid.Row="3" |
||||
|
IsReadOnly="True" /> |
||||
|
<Button HorizontalAlignment="Center" Name="MoveButton" VerticalAlignment="Center" Click="Button_OnClick">Move</Button> |
||||
|
</Grid> |
||||
|
</Window> |
||||
@ -0,0 +1,25 @@ |
|||||
|
using Avalonia; |
||||
|
using Avalonia.Controls; |
||||
|
using Avalonia.Interactivity; |
||||
|
using Avalonia.Markup.Xaml; |
||||
|
|
||||
|
namespace IntegrationTestApp; |
||||
|
|
||||
|
public class TopmostWindowTest : Window |
||||
|
{ |
||||
|
public TopmostWindowTest(string name) |
||||
|
{ |
||||
|
Name = name; |
||||
|
InitializeComponent(); |
||||
|
PositionChanged += (s, e) => this.GetControl<TextBox>("CurrentPosition").Text = $"{Position}"; |
||||
|
} |
||||
|
private void InitializeComponent() |
||||
|
{ |
||||
|
AvaloniaXamlLoader.Load(this); |
||||
|
} |
||||
|
|
||||
|
private void Button_OnClick(object? sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
Position += new PixelPoint(100, 100); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue