using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace GTPCorrgir { /// /// Interaction logic for notificacion.xaml /// public partial class notificacion : Window { public notificacion() { InitializeComponent(); PositionWindow(); } private void PositionWindow() { // Obtener la posición del cursor var cursorPosition = System.Windows.Forms.Cursor.Position; // Determinar en qué pantalla está el cursor var screen = Screen.FromPoint(cursorPosition); // Configurar la ubicación de la ventana para que aparezca en la esquina inferior derecha this.Left = screen.WorkingArea.Right - this.Width; this.Top = screen.WorkingArea.Bottom - this.Height; } public void UpdateNotification(string title, string message) { TitleText.Text = title; MessageText.Text = message; } } }