Binding error for UserControl "The member Resources is not recognized or is not accessible". RRS feed

  • Question

  • Hello,

    I have a weird issue in my code that I want to share with you and it is related to the binding in the view.I want to set the datacontext for the view,but when I write <UserControl.Resources> I get the error in the title("The member Resources is not recognized or is not accessible").This is how I set the datacontext for the usercontrol:


      RegisterStudentViewModel vm;
            public RegisterStudent()
                vm = new RegisterStudentViewModel();
                this.DataContext = vm;


    <UserControl x:Class="WPFAttendanceApp.View.RegisterStudent"
                 d:DesignHeight="450" d:DesignWidth="800">
        <Border Background="#2e3137" CornerRadius="20" Margin="20">

    What am I doing wrong and how should I establish the binding in the view?

    Tuesday, May 1, 2018 9:33 AM

All replies

  • Please try to change platform from AnyPC to x86 or x64 and see.




    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, May 3, 2018 3:21 AM
  • Have you tried to place <UserControl.Resources> outside the <Border>?
    Thursday, May 3, 2018 4:38 AM
  • Yes and sorry for the late response.I have tried as you said but it didn't work.For now I'm gonna keep it as a window and later on I'll try to find out the problem if it will be necessary to change.Thank you for your help.

    Best regards,


    Monday, May 7, 2018 9:21 AM