Пример #1
0
 public virtual void ResizeBrowser(IntPtr window)
 {
     if (_nativeHost != null)
     {
         var clientSize = _nativeHost.GetWindowClientSize();
         if (clientSize.Width > 0 && clientSize.Height > 0)
         {
             _nativeHost.ResizeBrowser(window, clientSize.Width, clientSize.Height);
         }
     }
 }
        /// <summary>
        ///     Default callback function to determine if we're located within the drag region.
        /// </summary>
        /// <param name="nativeHost"> The Chromely native host interface. </param>
        /// <param name="point">      The click point. </param>
        /// <returns> True if in the drag region, false if not. </returns>
        public bool IsDraggableCallbackFunc(IChromelyNativeHost nativeHost, Point point)
        {
            var size  = nativeHost.GetWindowClientSize();
            var scale = nativeHost.GetWindowDpiScale();

            var in_zone = false;

            foreach (var zone in DragZones)
            {
                if (zone.InZone(size, point, scale))
                {
                    in_zone = true;
                }
            }
            return(in_zone);
        }