Adding a Frame and Navigate to Page xy (in Code)

Hello

My Question is realy simple -
How can you dynamicaly add a Frame (Object) to a new or existing Document - and then navigate it to page xy

A Solution in C would be fine as well

 Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)

        Dim Child As New ContentControl()
       
Dim newFrame As New Frame()
'What ever it takes to create new Frame Object

        DockingManager.SetState(Child, DockState.Document)
        DockingManager.SetHeader(Child, "Dock" + (DockingManager1.Children.Count + 1).ToString())
        Child.Name = "Dock" + (DockingManager1.Children.Count + 1).ToString()
        DockingManager1.Children.Add(Child)
        TDILayoutPanel.SetTDIIndex(Child, 1)

   End Sub


Kind Regards
Dominique



2 Replies

SI Sigrist July 14, 2015 03:22 PM UTC

OK - Ticket closed ;)  I found the solution:
Regards


    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)


        Dim Child As New ContentControl()


      
        DockingManager.SetState(Child, DockState.Document)
        DockingManager.SetHeader(Child, "Dock" + (DockingManager1.Children.Count + 1).ToString())
        Child.Name = "Dock" + (DockingManager1.Children.Count + 1).ToString()

'Solution       
Child.Content = newFrame
Dim newFrame As New Frame()
        newFrame.Background = New SolidColorBrush(Windows.Media.Color.FromArgb(255, 51, 153, 255))

        DockingManager1.Children.Add(Child)
        TDILayoutPanel.SetTDIIndex(Child, 1)





    End Sub


SC Saranya CJ Syncfusion Team July 15, 2015 06:13 AM UTC

Hi Sigrist,
 
Thank you for your update. Please let us know if you require any other assistance.
 
Regards,
Saranya

Loader.
Up arrow icon