internal static void ShowFindUnsuccessfulMessage(FindToolBar findToolBar) { string text = findToolBar.SearchUp ? SR.Get("DocumentViewerSearchUpCompleteLabel") : SR.Get("DocumentViewerSearchDownCompleteLabel"); text = string.Format(CultureInfo.CurrentCulture, text, new object[] { findToolBar.SearchText }); HwndSource hwndSource = PresentationSource.CriticalFromVisual(findToolBar) as HwndSource; IntPtr parentHwnd = (hwndSource != null) ? hwndSource.CriticalHandle : IntPtr.Zero; SecurityHelper.ShowMessageBoxHelper(parentHwnd, text, SR.Get("DocumentViewerSearchCompleteTitle"), MessageBoxButton.OK, MessageBoxImage.Asterisk); }