Removing Invalidate call from inside OnIsVisibleChanged, instead making it a method so it can be called from other place if necessary

This commit is contained in:
dimas
2014-12-04 23:33:38 +07:00
parent d68e99b1d2
commit db517cc2da
+8 -3
View File
@@ -509,9 +509,6 @@ namespace CefSharp.Wpf
var isVisible = (bool)args.NewValue;
managedCefBrowserAdapter.WasHidden(!isVisible);
if (isVisible)
managedCefBrowserAdapter.Invalidate(PaintElementType.View);
}
private static void OnApplicationExit(object sender, ExitEventArgs e)
@@ -1291,5 +1288,13 @@ namespace CefSharp.Wpf
managedCefBrowserAdapter.AddWordToDictionary(word);
}
// Invalidate the view. The browser will call CefRenderHandler::OnPaint
// asynchronously. This method is only used when window rendering is
// disabled.
public void Invalidate(PaintElementType type)
{
managedCefBrowserAdapter.Invalidate(type);
}
}
}