Exemple #1
0
        /// <summary>
        ///     Returns the rectangle of the native window. Derived classes override
        ///     this to set the window rectangle relative to the control.
        /// </summary>
        /// <returns>
        ///     The rectangle of the native window.
        /// </returns>
        /// <seealso cref="UpdateWindowPosition"/>
        protected override Avalonia.Rect GetWindowStartRectangle()
        {
            // Typically windows has x, y, ... properties
            int x, y, width, height;

            _window.GetWindowRectangle(out x, out y, out width, out height);

            return(new Avalonia.Rect(x, y, width, height));
        }