Question

I try to make an application to display WebView inside a FlipView

<FlipView Name="mainPage"
    <WebView Name="wv1" Source="http://www.google.com/" 
        Width="1024" Height="768" />
    <WebView Name="wv2" Source="http://www.google.co.id/" 
        Width="1024" Height="768" />
    <WebView Name="wv3" Source="http://www.google.co.uk/" 
        Width="1024" Height="768" />
    <WebView Name="wv4" Source="http://www.google.com.sg/" 
        Width="1024" Height="768" />
</FlipView>

The problem is:

  • When the SelectedItem on wv2, and wv2 GotFocus it will display wv1, when wv2 LostFocus it will redraw again the wv2.
  • When the SelectedItem on wv3 or wv4 and GotFocus it will display blank page, when wv3 or wv4 LostFocus it will redraw again wv3 or wv4.
  • When the SelectedItem on wv1 there is no problem when GotFocus and there is no blinking.

Can anyone help me to give a direction what is wrong and maybe the best implementation for WebView inside of FlipView?

Était-ce utile?

La solution

Based on the answer in this forum, just add the FlipView.ItemsPanel inside the FlipView and the problem will solve.

<FlipView Name="mainPage">
     <FlipView.ItemsPanel>
         <ItemsPanelTemplate>
             <StackPanel Orientation="Horizontal" />
         </ItemsPanelTemplate>
     </FlipView.ItemsPanel>
     <WebView Name="wv1" Source="http://www.google.com/" Width="1024" Height="768" />
     <WebView Name="wv2" Source="http://www.google.co.id/" Width="1024" Height="768" />
     <WebView Name="wv3" Source="http://www.google.co.uk/" Width="1024" Height="768" />
     <WebView Name="wv4" Source="http://www.google.com.sg/" Width="1024" Height="768" />
 </FlipView>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top