Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Height problem of WindowsFormsHost inside scrollviewer

$
0
0

I am using WindowsFormsHost control in a wpf application .I used this WindowsFormsHostcontrol for hosting a CefGlue CefWebBrowser (an opensource webbrowser control) .

If i set the height of the WindowsFormsHost control to  a large value say (1000) , i cant see this control . My xaml is like

  <ScrollViewer  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"  Padding="10">     
            <DockPanel Name="container" Margin="5">
            
            </DockPanel>            
      </ScrollViewer>

And i am adding browser control like

  System.Windows.Forms.Integration.WindowsFormsHost host =
                    new System.Windows.Forms.Integration.WindowsFormsHost();
                host.HorizontalAlignment = HorizontalAlignment.Stretch;
                host.VerticalAlignment = VerticalAlignment.Stretch;
                browser= new CefWebBrowser();
                browser.MinimumSize = new System.Drawing.Size(820, 1400);
                browser.StartUrl = "www.google.com";
                host.Child = browser;
                container.Children.Add(host);

But if i remove Scrollviewer section from xaml it works.

What is the problem with WindowsFormHost and Scrollviewer Together Or How can i show the WindowsFormHost  inside a scrollviewer



Thanks ***Share Knowledge to gain more***


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>