Skip to content

Commit 9376a79

Browse files
committed
WPF - Allow overriding of IRenderWebBrowser.OnPopupSize and IRenderWebBrowser.OnPopupShow
1 parent e4c5856 commit 9376a79

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

CefSharp.Wpf/ChromiumWebBrowser.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,20 +964,32 @@ protected virtual void OnPaint(bool isPopup, Rect dirtyRect, IntPtr buffer, int
964964
RenderHandler?.OnPaint(isPopup, dirtyRect, buffer, width, height, img);
965965
}
966966

967+
/// <inheritdoc />
968+
void IRenderWebBrowser.OnPopupSize(Rect rect)
969+
{
970+
OnPopupSize(rect);
971+
}
972+
967973
/// <summary>
968974
/// Sets the popup size and position.
969975
/// </summary>
970976
/// <param name="rect">The popup rectangle (size and position).</param>
971-
void IRenderWebBrowser.OnPopupSize(Rect rect)
977+
protected virtual void OnPopupSize(Rect rect)
972978
{
973979
UiThreadRunAsync(() => SetPopupSizeAndPositionImpl(rect));
974980
}
975981

982+
/// <inheritdoc />
983+
void IRenderWebBrowser.OnPopupShow(bool isOpen)
984+
{
985+
OnPopupShow(isOpen);
986+
}
987+
976988
/// <summary>
977989
/// Sets the popup is open.
978990
/// </summary>
979991
/// <param name="isOpen">if set to <c>true</c> [is open].</param>
980-
void IRenderWebBrowser.OnPopupShow(bool isOpen)
992+
protected virtual void OnPopupShow(bool isOpen)
981993
{
982994
UiThreadRunAsync(() => { popupImage.Visibility = isOpen ? Visibility.Visible : Visibility.Hidden; });
983995
}

0 commit comments

Comments
 (0)