I think you could try rebuilding your project first. There's a similar question on Stack Overflow that you can refer to: Why am I seeing a "member is not recognized or is not accessible" error on my WPF User Control?