0

how can we add a webbrowser in a flipview in wpf.

eg, having 4 address
www.google.com, www.gmail.com, www.hotmail.com, www.yahoo.com

these four address should move with in 30 sec automatically in flipview. (like a image slider)

  • note: with image i tried it is working fine. but with webbroswer it is not working fine.

<Window.DataContext>
    <local:LinksData/>
</Window.DataContext>
<Window.Resources>
    <DataTemplate x:Key="ItemContentTemplate">
        <Grid x:Name="Grid_Content" Margin="100, 0, 100, 0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <WebBrowser HorizontalAlignment="Center" Source="{Binding Name}" Margin="0,15,0,5" />
        </Grid>
    </DataTemplate>
</Window.Resources>
<Grid  Background="White" >
    <dxwui:FlipView  ItemsSource="{Binding DataSource}" ItemTemplate="{StaticResource ItemContentTemplate}"/>
</Grid>

XML file

<?xml version="1.0" encoding="utf-8" ?>
<Links xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Link>

    <Name>"http://www.google.com"</Name>
  </Link>
  <Link>

    <Name>"http://www.yahoo.com"</Name>
  </Link>
  <Link>

    <Name>"http://www.outlook.com"</Name>
  </Link>
  <Link>

    <Name>"http://www.linkedin.com"</Name>
  </Link>

</Links>
Thomas
  • 1,445
  • 14
  • 30
  • Does this answer your question? [databind the Source property of the WebBrowser in WPF](https://stackoverflow.com/questions/263551/databind-the-source-property-of-the-webbrowser-in-wpf) – DmitryG Dec 03 '19 at 10:24
  • @dmitryg this for single webpage, i need multiple webpage moving each 30 sec. – Thomas Dec 03 '19 at 11:02
  • It does not matter multiple or not because we are talking about **binding the specific web browser control within the Flip View item**. The original reason is that the `WebBrowser.Source` property is not dependency property thus it can't be used for binding. The solution I mentioned can be a workaround. Please try it an share your results with us. – DmitryG Dec 03 '19 at 17:10

0 Answers0