The error happens when i included my own usercontrol in this line (drag & drop):
<my:ItemParte x:Name="UcItemParte" Panel.ZIndex="6" />
and the error says: "Object reference not set to an instance of an object."
And I don´t know why... any help?
UPDATE: This is the Sub New()
Shared Sub New() ListViewFontSizeProperty = DependencyProperty.Register("ListViewFontSize", _ GetType(Double), GetType(ItemParte)) End Sub
Public Sub New()
Try
mModeloItem = Modelo_Item.Instance
mModeloParte = Modelo_Parte.Instance
mModeloParteLinea = Modelo_Parte_Linea.Instance
' Llamada necesaria para el Diseñador de Windows Forms.
InitializeComponent()
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
If Not IsInDesignMode Then
mTextos = Textos.Instance
mConfig = Config.Instance
MainWin = My.Application.MainWindow
AddHandler MainWin.VentanaMensaje.ButtonAceptarExec, AddressOf VentanaMensaje_AceptarClickCallback
AddHandler MainWin.Fuentes.PropertyChanged, AddressOf Fuentes_PropertyChanged
MainWin.Fuentes.RecargarFontSize()
End If
Catch ex As Exception
My.Log.WriteEntry(ex.Message, TraceEventType.Critical)
End Try
End Sub