“Two-way binding requires Path or XPath” when edit wpf datagrid

前端 未结 1 392
野性不改
野性不改 2021-01-13 00:10

ContractListUserControl.XAML



        
相关标签:
1条回答
  • 2021-01-13 00:58

    to achieve the initialization of Person property you may modify as follows

    public class Contract
    {
        public Contract()
        {
            Person = new Person();
        }
    
        public string RankName { get; set; }
        public string RankShortName { get; set; }
        public Person Person { get; set; }
    }
    

    add a constructor and initialize accordingly

    0 讨论(0)
提交回复
热议问题