WPFDevelopersOrg / WPFDevelopers

🎉 Welcome to follow the "WPFDevelopers" public account! This is a sample project we share daily, covering WPF's basic controls and custom control libraries. The project will be continuously updated, welcome to give us ⭐️
MIT License
1.5k stars 240 forks source link

使用DataGrid时vs控制台报错 #82

Closed wanghaodong24 closed 1 month ago

wanghaodong24 commented 8 months ago

System.Windows.Data Error: 1 : Cannot create default converter to perform 'one-way' conversions between types 'System.Windows.Media.Brush' and 'System.Windows.Media.Color'. Consider using Converter property of Binding. BindingExpression:Path=Background; DataItem='DataGridRow' (Name=''); target element is 'SolidColorBrush' (HashCode=5096933); target property is 'Color' (type 'Color') System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='#FFFFFFFF' BindingExpression:Path=Background; DataItem='DataGridRow' (Name=''); target element is 'SolidColorBrush' (HashCode=5096933); target property is 'Color' (type 'Color')