Avalonia's TopLevel class It allows to interact with the platform TopLevel.GetTopLevel(Visual) searches the TopLevel, on which the Visual is attached to See more at https://docs.avaloniaui.net/docs/concepts/toplevel Recommendation Use TopLevel to interact with features of the platform