Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
Tilepane with frame
posted

Hello, I have a problem when I remove a tilepane with frame and I add a new tilepane with other frame. I have the message "Unable to load the contents of the Uri".

This is the code: Dim navig As New Frame
Dim tilePane1 As New TilePane
tilePane1.Header = "New Tile"
navig.Source = (New Uri(("/Views/Ven.xaml?Cat=1")), UriKind.Relative))
tilePane1.Content = navig
tlPanelliD.Items.Add(tilePane1)
...

For i As Integer = tlPanelliD.Items.Count - 1 To 0 Step -1
  tlPanelliD.Items.Remove(tlPanelliD.Items(i))
Next
Dim navig As New Frame
Dim tilePane1 As New TilePane
tilePane1.Header = "New Tile"
navig.Source = (New Uri(("/Views/Ven.xaml?Cat=2")), UriKind.Relative))
tilePane1.Content = navig
tlPanelliD.Items.Add(tilePane1)

Thank you

 

Parents
  • 27093
    posted

    Hello,

     

    I have been looking into your issue and had tried reproducing it with a sample of my own. I almost did, except I couldn’t get an error to show probably because I am using C# and there are such difference in the two languages. I think this is caused due to Silverlight’s limitation of having only one Frame instance at any time. What I mean by almost reproduced your behavior, is that I couldn’t make the Frame to work as expected while I kept adding new Frames. I finally managed to simulate switching the panes by using the initially used Frame’s Navigate method. I can suggest instead of removing and adding TilePanes I can suggest you Navigate your frame and setting the rest of the Tilepane’s properties that do not match.

     

    Hope this is helps. Please let me know if you require any further assistance on the matter.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

     

Reply Children