tags:

views:

33

answers:

1

I have a simple chart with two column series containing all months in the year. I want to filter a list view that show detailed information for the selected month. I can capture the event via MouseDown on the ColumnSeries but I'm not sure how to get to the month in the column series.

<DVC:ColumnSeries Title=" Expenditures" IndependentValueBinding="{Binding Path=Month}" DependentValueBinding="{Binding Path=Amt}" ItemsSource="{Binding Path=ActivityExpenditureSeries}" MouseDown="ColumnSeries_MouseDown" />

I'm sure I could do some fancy WPF databinding to the selected ColumnSeries for the listviews ItemSource but this is where I'm heading

    Private Sub ColumnSeries_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Input.MouseButtonEventArgs)
    ' This is the functionality I'm looking for...
    Dim selectedColumn As String
    FilterListView(selectedColumn)
End Sub
+1  A: 

Set the IsSelectionEnabled=True on the series and added a SelectionChanged event to the same series.

Private Sub colSeries_adjExpenditure_SelectionChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs)
        Dim cs As ColumnSeries = CType(sender, ColumnSeries)
        Dim dp As MyDataPoint = CType(cs.SelectedItem, MyDataPoint)
End Sub
knockando