We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

119612 Jul 14,2015 12:39 PM UTC Jul 15,2015 06:13 AM UTC WPF 2
loading
Tags: DockingManager
Sigrist
Asked On July 14, 2015 12:39 PM UTC

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



Sigrist
Replied On 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

Saranya CJ [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;