I am having problems (and instability) with the graphic interface in WPF, trying to incorporate controls gives me an error of "Object reference not established as an instance of an object". The call to the namespace is located at the beginning of the document.
xmlns:src="clr-namespace:CRM.Clientes"
Temporarily, and only in coding time, if I clean the solution and recompile it allows me to include the control, nevertheless it leaves a symbol of admiration on it, I can not find a reference of its meaning.
Does anyone have an idea of why it happens and how to solve it?
Appendix: 1.- Control code:
public partial class U_Empresa : UserControl
{
public U_Empresa()
{
InitializeComponent();
}
U_Clientes padre;
string idCliente = "";
public int agregando = 0;
public void setPadre(U_Clientes padreRecibido)
{
padre = padreRecibido;
idCliente = padre.idCliente;
DataTable datosCliente = DBConnection.getDatos("clientes", "idCliente", idCliente, " AND borrar=0");
if (datosCliente.Rows.Count < 1) return;
if (agregando != 1)
lblNombre.Content = datosCliente.Rows[0]["nombre"].ToString();
}
}