Files
LehrerApp/LehrerApp.Desktop/Views/Students/AddressViewerWindow.axaml.cs
T

19 lines
550 B
C#

using Avalonia;
using Avalonia.Controls;
namespace LehrerApp.Desktop.Views.Students;
public partial class AddressViewerWindow : Window
{
public AddressViewerWindow() => InitializeComponent();
protected override void OnOpened(EventArgs e)
{
base.OnOpened(e);
if (Owner is not Window owner) return;
Position = new PixelPoint(
owner.Position.X + Math.Max(20, (int)owner.Bounds.Width - (int)Width - 24),
owner.Position.Y + Math.Max(20, (int)owner.Bounds.Height - (int)Height - 48));
}
}