Imports DevExpress.Xpf.LayoutControl
Imports System.ComponentModel

Public Class tsLayoutItem
    Inherits LayoutItem
    <DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
    Public Property PropiedadesTS As New PropiedadesTS
    Public Event cargado()

    ' Private Sub tsLayoutItem_Initialized(sender As Object, e As System.EventArgs) Handles Me.Initialized

    'Try
    '    Dim mensaje As String = ""
    '    Dim tsli As tsLayoutItem = sender
    '    Dim po As Object = VisualTreeHelper.GetParent(tsli)
    '    Dim i As Integer
    '    Do While Not po Is Nothing
    '        'If po.GetType.BaseType Is GetType(ApCabLin) Then
    '        '    tsli.PropiedadesTS.ApCablin = po
    '        '    tsli.PropiedadesTS.ApCablin.ControlesTS.Add(tsli)

    '        '    Exit Do
    '        'Else
    '        '    mensaje &= po.GetType.BaseType.ToString & vbCrLf
    '        '    po = VisualTreeHelper.GetParent(po)
    '        'End If
    '        i += 1

    '        mensaje = po.GetType.BaseType.ToString & "---" & po.GetType.ToString & "---" & po.name
    '        po = VisualTreeHelper.GetParent(po)
    '    Loop
    '    MsgBox(i.ToString & " " & mensaje)
    'Catch ex As Exception
    '    MsgBox(ex.Message & ex.StackTrace)
    'End Try

    '  End Sub

    '  Private Sub tsLayoutItem_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    'Try
    '    Dim mensaje As String = ""
    '    Dim tsli As tsLayoutItem = sender
    '    Dim po As Object = VisualTreeHelper.GetParent(tsli)
    '    Do While Not po Is Nothing
    '        Try
    '            If po.GetType.ToString = "tsWPF.ApCabLin" Then
    '                Try
    '                    tsli.PropiedadesTS.ApCablin = po
    '                    'tsli.PropiedadesTS.ApCablin.ControlesTS.Add(tsli)
    '                Catch ex As Exception
    '                    MsgBox(ex.Message)
    '                End Try

    '            Else
    '                mensaje &= po.GetType.BaseType.ToString & "---" & po.GetType.ToString & "---" & po.name & vbCrLf
    '                po = VisualTreeHelper.GetParent(po)
    '            End If
    '        Catch ex As Exception
    '            mensaje &= po.GetType.BaseType.ToString & "---" & po.GetType.ToString & "---" & po.name & vbCrLf
    '            po = VisualTreeHelper.GetParent(po)
    '        End Try
    '    Loop
    '    '            MsgBox(i.ToString & " " & mensaje)
    'Catch ex As Exception
    '    MsgBox(ex.Message & ex.StackTrace)
    'End Try

    '   End Sub
End Class
