I came across a strange scenario when a frame refuses to update its contents.
I can understand what is happening, but the solution does not come to me.
I have a page with a frame (Frame1) and a few buttons. When I click on the button, the page loads into the frame. This works great in most situations.
Private Sub btnIncidents_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnIncidents.Click
Frame1.Source = New System.Uri("/Incident/Incidents.xaml", UriKind.Relative)
End Sub
However, I have a situation where I need to select the button that was previously pressed in order to effectively update on Uri. The problem is that he just does nothing, because Uri has not changed. It makes sense, but it's not what I want, I need to call it again.
My first solution was to introduce Frame1.Refresh, which initially did the trick. But once the page has been refreshed, none of the buttons can load another page.
As if calling Frame1.Refresh, I broke the ability of Frames to go to other pages.
My second idea was to set the Frame source to Nothing (Null), and then set the source to URI, but that didn't work either. those. Frame1.Source = Nothing
Does anyone else come across this or may have some suggestions? I just need to refresh / reload the Frames page without breaking the frame!
Mitch source
share