microsoft / InteractiveDataDisplay.WPF

Interactive Data Display for WPF is a set of controls for adding interactive visualization of dynamic data to your application. It allows to create line graphs, bubble charts, heat maps and other complex 2D plots which are very common in scientific software. Interactive Data Display for WPF integrates well with Bing Maps control to show data on a geographic map in latitude/longitude coordinates. The controls can also be operated programmatically.
Other
968 stars 266 forks source link

Minor bugfix in data binding #28

Open L1ttleFlyyy opened 5 years ago

L1ttleFlyyy commented 5 years ago

The error happens when using default d3:Chart control:

System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.SolidColorBrush' and 'System.Windows.Media.Brush'. Consider using Converter property of Binding. BindingExpression:Path=Stroke; DataItem='AxisGrid' (Name=''); target element is 'Path' (Name=''); target property is 'Stroke' (type 'Brush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.SolidColorBrush' and 'System.Windows.Media.Brush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='Axis' (Name=''); target element is 'Path' (Name=''); target property is 'Stroke' (type 'Brush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.SolidColorBrush' and 'System.Windows.Media.Brush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='Axis' (Name=''); target element is 'Path' (Name=''); target property is 'Stroke' (type 'Brush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.Brush' and 'System.Windows.Media.SolidColorBrush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='PlotAxis' (Name='PART_horizontalAxis'); target element is 'Axis' (Name=''); target property is 'Foreground' (type 'SolidColorBrush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.SolidColorBrush' and 'System.Windows.Media.Brush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='Axis' (Name=''); target element is 'Path' (Name=''); target property is 'Stroke' (type 'Brush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.SolidColorBrush' and 'System.Windows.Media.Brush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='Axis' (Name=''); target element is 'Path' (Name=''); target property is 'Stroke' (type 'Brush') System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Windows.Media.Brush' and 'System.Windows.Media.SolidColorBrush'. Consider using Converter property of Binding. BindingExpression:Path=Foreground; DataItem='PlotAxis' (Name='PART_verticalAxis'); target element is 'Axis' (Name=''); target property is 'Foreground' (type 'SolidColorBrush')

Fixed by changing Axis.Foreground and AxisGrid.Stroke from "SolidColorBrush" to "Brush", so that these properties can be successfully bound to other "Foreground(type 'Brush')" properties.

msftclas commented 5 years ago

CLA assistant check
All CLA requirements met.