This project is read-only.

ShapePointMarker FillProperty

Jun 10, 2010 at 6:15 PM

I am trying to create a graph with colors bound to objects.  My LineGraph is binding to the color without any issues.  Works like a charm.  However, the CirclePointMarker won't bind correctly at all.  It won't even enter my converter, what am i missing here?  Thanks in advance...

comp As New EnumerableDataSource(Of SingleDataSourceNode)(DS) comp.SetYMapping(Function(d) d.Y) comp.SetXMapping(Function(d) d.X) Dim CPM As New CirclePointMarker CPM.Size = 7 Dim P As New System.Windows.Media.Pen() P.Thickness = 2 If fitOrder > 0 Then P.DashStyle = DashStyles.Dash End If Dim tempLMGraph As LineAndMarker(Of MarkerPointsGraph) = chart.AddLineGraph(comp, P, CPM, New Microsoft.Research.DynamicDataDisplay.PenDescription(lineName)) tempLMGraph.LineGraph.DataContext = ObjectWithColorProperty tempLMGraph.MarkerGraph.DataContext = ObjectWithColorProperty Dim B2 As New Binding("Color") B2.Converter = New ColorToBrushConverter B2.ConverterParameter = P BindingOperations.SetBinding(P, System.Windows.Media.Pen.BrushProperty, B2) Dim B As New Binding("Color") B.Converter = New ColorToBrushConverter B.ConverterParameter = CPM BindingOperations.SetBinding(CPM, ShapePointMarker.FillProperty, B) BindingOperations.SetBinding(CPM, ShapePointMarker.PenProperty, B)