Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using WebBrowser control inside DataTemplate. To show data at UI , I am using <GridView> inside <ListView.View> and using CellTemplate property of GridViewColumn. Now when I scroll down grid and then Scroll Up, all the WebBrowser control remains at top and hide the all menus of Page, It means WebBrower controls does not move with Scroll Up and Down.   

<pre lang="xml">
<pre><ListView x:Name="lvData" ItemContainerStyle="{StaticResource ListViewItemStyle1}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="10 0 10 10" SelectionMode="Multiple" Grid.Row="3"   
                          SizeChanged="OnContentChanged" ScrollViewer.ScrollChanged="lvData_OnScrollChanged" GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler" ScrollViewer.IsDeferredScrollingEnabled="True">
                    <ListView.View>
                        <GridView x:Name="gv">
			.........
    <GridViewColumn Header="Imported Skins" CellTemplate="{StaticResource WebCellTemplate}" Width="300" />
                        </GridView>
                    </ListView.View>
</ListView>

<DataTemplate x:Key="WebCellTemplate">
            <Grid ToolTip="{Binding Path=NewValue}">
                <TextBlock.../>
                <Image...../>
                <WebBrowser HorizontalAlignment="Left" c:WebBrowserUtility.BindableSource="{Binding Path=NewFile}" Visibility="{Binding Path=NewValue, Converter={StaticResource WebConverter}}" />
            </Grid>
</DataTemplate>



Actual Result : WebBrowser controls does not move with Scroll down and Up and hide all menus of page when page is scrolled down and then up.

Expected : WebBrowser controls should move with Scroll down and up and should not hide menu bar.


What I have tried:

I tried using CefSharp.WPF dll but it could not work.
Posted
Updated 25-Jun-19 22:25pm

1 solution

Grid "Cell templates" are not meant for "heavy" controls like web browsers. Open a couple hundred "browser tabs" and see what happens. Same difference.
 
Share this answer
 
Comments
Member 10904305 26-Jun-19 4:52am    
Thanks for reply, but can we do something to resolve this problem except removing "CellTemplate" , or what we can use except Cell Template ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900