protected override void OnWindowPositionChanged(System.Windows.Rect rcBoundingBox) { base.OnWindowPositionChanged(rcBoundingBox); if (this.ExplorerBrowserNative != null) { var ptr = IntPtr.Zero; var rect = RECT.Create(rcBoundingBox.Left, rcBoundingBox.Top, rcBoundingBox.Right, rcBoundingBox.Bottom); this.ExplorerBrowserNative.SetRect(ref ptr, rect); } }
private void Create() { this.ExplorerBrowserNative = new ExplorerBrowserNative(); ShellLightwaightNativeMethods.IUnknown_SetSite(this.ExplorerBrowserNative, this); this.ExplorerBrowserNative.Advise( Marshal.GetComInterfaceForObject(this, typeof(IExplorerBrowserEvents)), out this.eventCookie); this.viewEvents = new ExplorerBrowserViewEvents(this); var rect = RECT.Create(0, 0, this.ActualWidth, this.ActualHeight); this.ExplorerBrowserNative.Initialize(this.hwndSource.Handle, ref rect, null); this.ExplorerBrowserNative.SetOptions(EXPLORER_BROWSER_OPTIONS.EBO_SHOWFRAMES); this.ExplorerBrowserNative.SetPropertyBag(this.PropertyBagName); }