public LoginWindowModel() { xmlAdapter = new XmlAdapter <UserData>( new[] { "Login", "Password" }, (row) => { UserData user = new UserData(); user.UserName = Convert.ToString(row["Login"]); user.Passwrod = Convert.ToString(row["Password"]); return(user); }, (row, value) => { row["Login"] = value.UserName; row["Password"] = value.Passwrod; }); xmlAdapter.XmlPath = xmlPath; xmlAdapter.DataSetName = "Users"; xmlAdapter.TableName = "User"; Load(); }