raddock x DockingManager1

2 posts, 0 answers
  1. Fabio Andrade
    Fabio Andrade avatar
    1 posts
    Member since:
    Apr 2007

    Posted 02 Jun 2010 Link to this post

    Hi,

    i've an old version of telerik products, now i try new version , but i have some problems.


    how can i  do this in raddock:
    DirectCast(mainform.DockingManager1.ActiveMdiChild, NewPtable).

    'cause in raddock , when i use activemdiform, gave an error "expression does not prduce value"


    and how can close tabbed when close child form.


    thanks
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 07 Jun 2010 Link to this post

    Hello Fabio,

    Thank you for the question.

    RadDock does not expose the active MDI child form as a property. However, you can easily get the active form by using the following code snippet:
    Dim activeForm As Form = Nothing
    Dim mdiChild As Form = Me.FindForm().ActiveMdiChild
    Dim window As DockWindow = Me.radDock1.DocumentManager.ActiveDocument
    If TypeOf window Is HostWindow Then
        Dim host As HostWindow = TryCast(window, HostWindow)
        If Not host Is Nothing Then
            If TypeOf host.Content Is Form Then
                ' this is the form in question
                activeForm = CType(host.Content, Form)
            End If
        End If
    End If

    If I understand your second correctly, the HostWindow that hosts a child mdi form is automatically closed when the form is closed, so you do not need to do it manually.

    If you have additional questions, feel free to contact me.

    Regards,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top