Hello,
Is it possible to add “back” and “forward” navigation for browser controls when using webview?
Hello,
Is it possible to add “back” and “forward” navigation for browser controls when using webview?
Hi,
and yes. There are GoBack and GoForward UX elements that should make implementing that a breeze.
Thanks Uldis!
So that would allow me to navigate back/forward in the web view browser? Just trying to figure out what I should place as the target
That would be NavigationContext
. Here’s a complete, minimal working example:
<App>
<ClientPanel>
<NativeViewHost>
<DockPanel>
<Grid Dock="Top" ColumnCount="2" Height="48" Margin="8" CellSpacing="8">
<Panel HitTestMode="LocalBounds">
<Text Value="Go Back" Alignment="Center" Color="#fff" />
<Clicked>
<GoBack NavigationContext="wv" />
</Clicked>
<Rectangle Color="#18f" CornerRadius="2" />
</Panel>
<Panel HitTestMode="LocalBounds">
<Text Value="Go Forward" Alignment="Center" Color="#fff" />
<Clicked>
<GoForward NavigationContext="wv" />
</Clicked>
<Rectangle Color="#18f" CornerRadius="2" />
</Panel>
</Grid>
<WebView ux:Name="wv" Url="https://fusetools.com/" />
</DockPanel>
</NativeViewHost>
</ClientPanel>
</App>