How to bind static property to ListView?

Sarah 186 Reputation points
2022-03-10T13:52:53.517+00:00

I have written a static class "ContactRef" to get the propertey Contact in the ViewModels AddContactViewModel and ContactListingViewModel

namespace cManagement.Models  
{  
    public class ContactRef  
    {  
        public static ContactModel Contact { get; set; }   
    }  
}  

namespace cManagement.Models  
{  
    public class ContactModel  
    {  
        public int Id { get; set; }  
        public string Firstname { get; set; }  
        public string Lastname { get; set; }  
    }  
}  

After that the binding to the ListView did not work anymore. Can anyone help to find the error?
the whole code is here

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,686 questions
{count} votes